<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.5"/>
<title>QCNSim: TrafficGenerator Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">QCNSim
   </div>
   <div id="projectbrief">Simulator for Quake-Catcher Network</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.5 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a> &#124;
<a href="class_traffic_generator-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">TrafficGenerator Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div>  </div>
</div><!--header-->
<div class="contents">

<p><a class="el" href="class_traffic_generator.html" title="TrafficGenerator parent class. ">TrafficGenerator</a> parent class.  
 <a href="class_traffic_generator.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_traffic_generator_8h_source.html">TrafficGenerator.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for TrafficGenerator:</div>
<div class="dyncontent">
 <div class="center">
  <img src="class_traffic_generator.png" usemap="#TrafficGenerator_map" alt=""/>
  <map id="TrafficGenerator_map" name="TrafficGenerator_map">
<area href="class_entity.html" title="Entity class. " alt="Entity" shape="rect" coords="380,0,560,24"/>
<area href="class_constant_rate_traffic_generator.html" title="ConstantRateTrafficGenerator class. " alt="ConstantRateTrafficGenerator" shape="rect" coords="0,112,180,136"/>
<area href="class_exponential_traffic_generator.html" title="ExponentialTrafficGenerator class. " alt="ExponentialTrafficGenerator" shape="rect" coords="190,112,370,136"/>
<area href="class_normal_traffic_generator.html" title="NormalTrafficGenerator class. " alt="NormalTrafficGenerator" shape="rect" coords="380,112,560,136"/>
<area href="class_qcn_sensor_traffic_generator.html" title="QCN Sensor Traffic Generator. " alt="QcnSensorTrafficGenerator" shape="rect" coords="570,112,750,136"/>
<area href="class_weibull_traffic_generator.html" title="WeibullTrafficGenerator class. " alt="WeibullTrafficGenerator" shape="rect" coords="760,112,940,136"/>
</map>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:aad024e020fac17dbee74f0da16707df1"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_traffic_generator.html#aad024e020fac17dbee74f0da16707df1">turnOn</a> ()</td></tr>
<tr class="separator:aad024e020fac17dbee74f0da16707df1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af1aeb5d90d269a1d1ac5316522b5233e"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_traffic_generator.html#af1aeb5d90d269a1d1ac5316522b5233e">turnOff</a> ()</td></tr>
<tr class="separator:af1aeb5d90d269a1d1ac5316522b5233e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac8c16ee901079f8279fafd7411098cbd"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_traffic_generator.html#ac8c16ee901079f8279fafd7411098cbd">setTokenContents</a> (std::shared_ptr&lt; <a class="el" href="class_entity.html">Entity</a> &gt; <a class="el" href="class_traffic_generator.html#acb5d8009cf49ff99a6fee75ec456e166">tokenContents</a>)</td></tr>
<tr class="separator:ac8c16ee901079f8279fafd7411098cbd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab9b21f5739748fadede79c7e4fa35ed7"><td class="memItemLeft" align="right" valign="top">virtual unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_traffic_generator.html#ab9b21f5739748fadede79c7e4fa35ed7">getTokensGeneratedCount</a> () const </td></tr>
<tr class="separator:ab9b21f5739748fadede79c7e4fa35ed7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac97d2e786e7c91117fbf590988eefd04"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="_event_type_8h.html#a2628ea8d12e8b2563c32f05dc7fff6fa">EventType</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_traffic_generator.html#ac97d2e786e7c91117fbf590988eefd04">getEventType</a> () const </td></tr>
<tr class="separator:ac97d2e786e7c91117fbf590988eefd04"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa9c53b70da6a733cb0723282b291b25f"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_traffic_generator.html#aa9c53b70da6a733cb0723282b291b25f">setEventType</a> (<a class="el" href="_event_type_8h.html#a2628ea8d12e8b2563c32f05dc7fff6fa">EventType</a> <a class="el" href="class_traffic_generator.html#a84eef27cdbfa66bbf8c14e0128196a62">eventType</a>)</td></tr>
<tr class="separator:aa9c53b70da6a733cb0723282b291b25f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3f71664ca8b268773234c1538539bebf"><td class="memItemLeft" align="right" valign="top">virtual std::shared_ptr&lt; <a class="el" href="class_entity.html">Entity</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_traffic_generator.html#a3f71664ca8b268773234c1538539bebf">getTokenContents</a> () const </td></tr>
<tr class="separator:a3f71664ca8b268773234c1538539bebf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2247f62c33cf0875f423b58403af7042"><td class="memItemLeft" align="right" valign="top">virtual std::shared_ptr&lt; <a class="el" href="class_entity.html">Entity</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_traffic_generator.html#a2247f62c33cf0875f423b58403af7042">getSource</a> () const </td></tr>
<tr class="separator:a2247f62c33cf0875f423b58403af7042"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad5c0ccdbf176c8aadd4b1bc7771ea326"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_traffic_generator.html#ad5c0ccdbf176c8aadd4b1bc7771ea326">setSource</a> (std::shared_ptr&lt; <a class="el" href="class_entity.html">Entity</a> &gt; <a class="el" href="class_traffic_generator.html#a4f69b85034831c2c40e789b0c0e11511">source</a>)</td></tr>
<tr class="separator:ad5c0ccdbf176c8aadd4b1bc7771ea326"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abb89d1eefa73ddf5ea95167bd9245b48"><td class="memItemLeft" align="right" valign="top">virtual std::shared_ptr&lt; <a class="el" href="class_entity.html">Entity</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_traffic_generator.html#abb89d1eefa73ddf5ea95167bd9245b48">getDestination</a> () const </td></tr>
<tr class="separator:abb89d1eefa73ddf5ea95167bd9245b48"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9984034478b838d1f09d275e297f3309"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_traffic_generator.html#a9984034478b838d1f09d275e297f3309">setDestination</a> (std::shared_ptr&lt; <a class="el" href="class_entity.html">Entity</a> &gt; <a class="el" href="class_traffic_generator.html#a6ba09ea9c5df93de64af75886df0b11b">destination</a>)</td></tr>
<tr class="separator:a9984034478b838d1f09d275e297f3309"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_class_entity"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_class_entity')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="class_entity.html">Entity</a></td></tr>
<tr class="memitem:ac2da1e8a32161accc56f39ac52cebd86 inherit pub_methods_class_entity"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_entity.html#ac2da1e8a32161accc56f39ac52cebd86">~Entity</a> ()=0</td></tr>
<tr class="memdesc:ac2da1e8a32161accc56f39ac52cebd86 inherit pub_methods_class_entity"><td class="mdescLeft">&#160;</td><td class="mdescRight">Make this abstract (pure virtual), cannot be instantiated.  <a href="#ac2da1e8a32161accc56f39ac52cebd86">More...</a><br/></td></tr>
<tr class="separator:ac2da1e8a32161accc56f39ac52cebd86 inherit pub_methods_class_entity"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr class="memitem:a6fcdb1ce1b3fb4f35c021ea8b99f6cf5"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_traffic_generator.html#a6fcdb1ce1b3fb4f35c021ea8b99f6cf5">TrafficGenerator</a> (<a class="el" href="class_simulator_globals.html">SimulatorGlobals</a> &amp;<a class="el" href="class_traffic_generator.html#a42261ccf207f61a401473a106bc0bae3">simulatorGlobals</a>, <a class="el" href="class_scheduler.html">Scheduler</a> &amp;<a class="el" href="class_traffic_generator.html#a9569cd494b926b84f384c7380349d51a">scheduler</a>, <a class="el" href="_event_type_8h.html#a2628ea8d12e8b2563c32f05dc7fff6fa">EventType</a> <a class="el" href="class_traffic_generator.html#a84eef27cdbfa66bbf8c14e0128196a62">eventType</a>, std::shared_ptr&lt; <a class="el" href="class_entity.html">Entity</a> &gt; <a class="el" href="class_traffic_generator.html#acb5d8009cf49ff99a6fee75ec456e166">tokenContents</a>, std::shared_ptr&lt; <a class="el" href="class_entity.html">Entity</a> &gt; <a class="el" href="class_traffic_generator.html#a4f69b85034831c2c40e789b0c0e11511">source</a>, std::shared_ptr&lt; <a class="el" href="class_entity.html">Entity</a> &gt; <a class="el" href="class_traffic_generator.html#a6ba09ea9c5df93de64af75886df0b11b">destination</a>, int <a class="el" href="class_traffic_generator.html#a2158c9e714171e5a04032571021b23c4">priority</a>)</td></tr>
<tr class="separator:a6fcdb1ce1b3fb4f35c021ea8b99f6cf5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa805566ed505ad0f90982610bcf3869a"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_traffic_generator.html#aa805566ed505ad0f90982610bcf3869a">TrafficGenerator</a> (<a class="el" href="class_simulator_globals.html">SimulatorGlobals</a> &amp;<a class="el" href="class_traffic_generator.html#a42261ccf207f61a401473a106bc0bae3">simulatorGlobals</a>, <a class="el" href="class_scheduler.html">Scheduler</a> &amp;<a class="el" href="class_traffic_generator.html#a9569cd494b926b84f384c7380349d51a">scheduler</a>, <a class="el" href="_event_type_8h.html#a2628ea8d12e8b2563c32f05dc7fff6fa">EventType</a> <a class="el" href="class_traffic_generator.html#a84eef27cdbfa66bbf8c14e0128196a62">eventType</a>, std::shared_ptr&lt; <a class="el" href="class_entity.html">Entity</a> &gt; <a class="el" href="class_traffic_generator.html#acb5d8009cf49ff99a6fee75ec456e166">tokenContents</a>, std::shared_ptr&lt; <a class="el" href="class_entity.html">Entity</a> &gt; <a class="el" href="class_traffic_generator.html#a4f69b85034831c2c40e789b0c0e11511">source</a>, std::shared_ptr&lt; <a class="el" href="class_entity.html">Entity</a> &gt; <a class="el" href="class_traffic_generator.html#a6ba09ea9c5df93de64af75886df0b11b">destination</a>, int <a class="el" href="class_traffic_generator.html#a2158c9e714171e5a04032571021b23c4">priority</a>, unsigned int seed)</td></tr>
<tr class="separator:aa805566ed505ad0f90982610bcf3869a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa1943a93355f1856e639a0f163413249"><td class="memItemLeft" align="right" valign="top">virtual std::shared_ptr&lt; <a class="el" href="class_token.html">Token</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_traffic_generator.html#aa1943a93355f1856e639a0f163413249">createInstanceTrafficEvent</a> (bool recordRoute=false)=0</td></tr>
<tr class="separator:aa1943a93355f1856e639a0f163413249"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a49bef7ab761909d3b21f057a0f24b135"><td class="memItemLeft" align="right" valign="top">virtual std::shared_ptr&lt; <a class="el" href="class_token.html">Token</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_traffic_generator.html#a49bef7ab761909d3b21f057a0f24b135">createInstanceTrafficEvent</a> (std::shared_ptr&lt; <a class="el" href="class_entity.html">Entity</a> &gt; <a class="el" href="class_traffic_generator.html#acb5d8009cf49ff99a6fee75ec456e166">tokenContents</a>, bool recordRoute=false)=0</td></tr>
<tr class="separator:a49bef7ab761909d3b21f057a0f24b135"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af51fd5d3e1200ae9e7d849a554647fcd"><td class="memItemLeft" align="right" valign="top">virtual std::shared_ptr&lt; <a class="el" href="class_token.html">Token</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_traffic_generator.html#af51fd5d3e1200ae9e7d849a554647fcd">createInstanceTrafficEvent</a> (std::vector&lt; std::shared_ptr&lt; <a class="el" href="class_entity.html">Entity</a> &gt;&gt; explicitRoute, bool recordRoute=false)=0</td></tr>
<tr class="separator:af51fd5d3e1200ae9e7d849a554647fcd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac0ccf573b26189a81bcbb4d66b28a922"><td class="memItemLeft" align="right" valign="top">virtual std::shared_ptr&lt; <a class="el" href="class_token.html">Token</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_traffic_generator.html#ac0ccf573b26189a81bcbb4d66b28a922">createInstanceTrafficEvent</a> (std::shared_ptr&lt; <a class="el" href="class_entity.html">Entity</a> &gt; <a class="el" href="class_traffic_generator.html#acb5d8009cf49ff99a6fee75ec456e166">tokenContents</a>, std::vector&lt; std::shared_ptr&lt; <a class="el" href="class_entity.html">Entity</a> &gt;&gt; explicitRoute, bool recordRoute=false)=0</td></tr>
<tr class="separator:ac0ccf573b26189a81bcbb4d66b28a922"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4efc8d0f973cf1ea906c50e85b6e4ec7"><td class="memItemLeft" align="right" valign="top">virtual std::shared_ptr<br class="typebreak"/>
&lt; <a class="el" href="class_protocol_data_unit.html">ProtocolDataUnit</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_traffic_generator.html#a4efc8d0f973cf1ea906c50e85b6e4ec7">createInstanceTrafficEventPdu</a> (unsigned int pduSize, bool recordRoute=false)=0</td></tr>
<tr class="memdesc:a4efc8d0f973cf1ea906c50e85b6e4ec7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates an instance of traffic event with PDU.  <a href="#a4efc8d0f973cf1ea906c50e85b6e4ec7">More...</a><br/></td></tr>
<tr class="separator:a4efc8d0f973cf1ea906c50e85b6e4ec7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae439634e20e6b7844a0269d6baea7e6c"><td class="memItemLeft" align="right" valign="top">virtual std::shared_ptr<br class="typebreak"/>
&lt; <a class="el" href="class_protocol_data_unit.html">ProtocolDataUnit</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_traffic_generator.html#ae439634e20e6b7844a0269d6baea7e6c">createInstanceTrafficEventPdu</a> (unsigned int pduSize, std::shared_ptr&lt; <a class="el" href="class_entity.html">Entity</a> &gt; <a class="el" href="class_traffic_generator.html#acb5d8009cf49ff99a6fee75ec456e166">tokenContents</a>, bool recordRoute=false)=0</td></tr>
<tr class="memdesc:ae439634e20e6b7844a0269d6baea7e6c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates an instance of traffic event.  <a href="#ae439634e20e6b7844a0269d6baea7e6c">More...</a><br/></td></tr>
<tr class="separator:ae439634e20e6b7844a0269d6baea7e6c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a39ab5cd8466b7d2685442000b48070a9"><td class="memItemLeft" align="right" valign="top">virtual std::shared_ptr<br class="typebreak"/>
&lt; <a class="el" href="class_protocol_data_unit.html">ProtocolDataUnit</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_traffic_generator.html#a39ab5cd8466b7d2685442000b48070a9">createInstanceTrafficEventPdu</a> (unsigned int pduSize, std::vector&lt; std::shared_ptr&lt; <a class="el" href="class_entity.html">Entity</a> &gt;&gt; explicitRoute, bool recordRoute=false)=0</td></tr>
<tr class="memdesc:a39ab5cd8466b7d2685442000b48070a9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates an instance of traffic event.  <a href="#a39ab5cd8466b7d2685442000b48070a9">More...</a><br/></td></tr>
<tr class="separator:a39ab5cd8466b7d2685442000b48070a9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a058d0a28ed8206bc5b8295498673fefe"><td class="memItemLeft" align="right" valign="top">virtual std::shared_ptr<br class="typebreak"/>
&lt; <a class="el" href="class_protocol_data_unit.html">ProtocolDataUnit</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_traffic_generator.html#a058d0a28ed8206bc5b8295498673fefe">createInstanceTrafficEventPdu</a> (unsigned int pduSize, std::shared_ptr&lt; <a class="el" href="class_entity.html">Entity</a> &gt; <a class="el" href="class_traffic_generator.html#acb5d8009cf49ff99a6fee75ec456e166">tokenContents</a>, std::vector&lt; std::shared_ptr&lt; <a class="el" href="class_entity.html">Entity</a> &gt;&gt; explicitRoute, bool recordRoute=false)=0</td></tr>
<tr class="memdesc:a058d0a28ed8206bc5b8295498673fefe"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates an instance of traffic event.  <a href="#a058d0a28ed8206bc5b8295498673fefe">More...</a><br/></td></tr>
<tr class="separator:a058d0a28ed8206bc5b8295498673fefe"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:a9569cd494b926b84f384c7380349d51a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_scheduler.html">Scheduler</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_traffic_generator.html#a9569cd494b926b84f384c7380349d51a">scheduler</a></td></tr>
<tr class="memdesc:a9569cd494b926b84f384c7380349d51a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reference to <a class="el" href="class_scheduler.html" title="Scheduler class. ">Scheduler</a> object, such that traffic generators may schedule their events.  <a href="#a9569cd494b926b84f384c7380349d51a">More...</a><br/></td></tr>
<tr class="separator:a9569cd494b926b84f384c7380349d51a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a42261ccf207f61a401473a106bc0bae3"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_simulator_globals.html">SimulatorGlobals</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_traffic_generator.html#a42261ccf207f61a401473a106bc0bae3">simulatorGlobals</a></td></tr>
<tr class="memdesc:a42261ccf207f61a401473a106bc0bae3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reference to <a class="el" href="class_simulator_globals.html" title="Simulator-scope variables and parameters. ">SimulatorGlobals</a> object, to get random generator info.  <a href="#a42261ccf207f61a401473a106bc0bae3">More...</a><br/></td></tr>
<tr class="separator:a42261ccf207f61a401473a106bc0bae3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a84eef27cdbfa66bbf8c14e0128196a62"><td class="memItemLeft" align="right" valign="top"><a class="el" href="_event_type_8h.html#a2628ea8d12e8b2563c32f05dc7fff6fa">EventType</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_traffic_generator.html#a84eef27cdbfa66bbf8c14e0128196a62">eventType</a></td></tr>
<tr class="memdesc:a84eef27cdbfa66bbf8c14e0128196a62"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="class_event.html" title="Event class. ">Event</a> type that this generator will produce.  <a href="#a84eef27cdbfa66bbf8c14e0128196a62">More...</a><br/></td></tr>
<tr class="separator:a84eef27cdbfa66bbf8c14e0128196a62"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acb5d8009cf49ff99a6fee75ec456e166"><td class="memItemLeft" align="right" valign="top">std::shared_ptr&lt; <a class="el" href="class_entity.html">Entity</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_traffic_generator.html#acb5d8009cf49ff99a6fee75ec456e166">tokenContents</a></td></tr>
<tr class="memdesc:acb5d8009cf49ff99a6fee75ec456e166"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reference to <a class="el" href="class_entity.html" title="Entity class. ">Entity</a> object that will be carried by the token.  <a href="#acb5d8009cf49ff99a6fee75ec456e166">More...</a><br/></td></tr>
<tr class="separator:acb5d8009cf49ff99a6fee75ec456e166"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4f69b85034831c2c40e789b0c0e11511"><td class="memItemLeft" align="right" valign="top">std::shared_ptr&lt; <a class="el" href="class_entity.html">Entity</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_traffic_generator.html#a4f69b85034831c2c40e789b0c0e11511">source</a></td></tr>
<tr class="memdesc:a4f69b85034831c2c40e789b0c0e11511"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="class_entity.html" title="Entity class. ">Entity</a> to which the generator is attached (to which tokens are generated).  <a href="#a4f69b85034831c2c40e789b0c0e11511">More...</a><br/></td></tr>
<tr class="separator:a4f69b85034831c2c40e789b0c0e11511"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6ba09ea9c5df93de64af75886df0b11b"><td class="memItemLeft" align="right" valign="top">std::shared_ptr&lt; <a class="el" href="class_entity.html">Entity</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_traffic_generator.html#a6ba09ea9c5df93de64af75886df0b11b">destination</a></td></tr>
<tr class="memdesc:a6ba09ea9c5df93de64af75886df0b11b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destination entity, to which the generated tokens will be sent.  <a href="#a6ba09ea9c5df93de64af75886df0b11b">More...</a><br/></td></tr>
<tr class="separator:a6ba09ea9c5df93de64af75886df0b11b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2158c9e714171e5a04032571021b23c4"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_traffic_generator.html#a2158c9e714171e5a04032571021b23c4">priority</a></td></tr>
<tr class="memdesc:a2158c9e714171e5a04032571021b23c4"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="class_token.html" title="Token class. ">Token</a> priority. Higher priority, higher number.  <a href="#a2158c9e714171e5a04032571021b23c4">More...</a><br/></td></tr>
<tr class="separator:a2158c9e714171e5a04032571021b23c4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaa73cfc4e885ecfeecbe894efd232493"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_traffic_generator.html#aaa73cfc4e885ecfeecbe894efd232493">isOn</a></td></tr>
<tr class="memdesc:aaa73cfc4e885ecfeecbe894efd232493"><td class="mdescLeft">&#160;</td><td class="mdescRight">True if generator is on (and generating traffic); false if generator is off.  <a href="#aaa73cfc4e885ecfeecbe894efd232493">More...</a><br/></td></tr>
<tr class="separator:aaa73cfc4e885ecfeecbe894efd232493"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a29c9cdcb113742700e3f7fcbcb7ee325"><td class="memItemLeft" align="right" valign="top">unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_traffic_generator.html#a29c9cdcb113742700e3f7fcbcb7ee325">tokensGeneratedCount</a></td></tr>
<tr class="memdesc:a29c9cdcb113742700e3f7fcbcb7ee325"><td class="mdescLeft">&#160;</td><td class="mdescRight">Count of tokens (events) generated by this traffic generator.  <a href="#a29c9cdcb113742700e3f7fcbcb7ee325">More...</a><br/></td></tr>
<tr class="separator:a29c9cdcb113742700e3f7fcbcb7ee325"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p><a class="el" href="class_traffic_generator.html" title="TrafficGenerator parent class. ">TrafficGenerator</a> parent class. </p>
<dl class="section author"><dt>Author</dt><dd>Marcos Portnoi </dd></dl>
<dl class="section date"><dt>Date</dt><dd>July 2013</dd></dl>
<dl class="section copyright"><dt>Copyright</dt><dd>Copyright (C) 2013 University of Delaware. </dd>
<dd>
QCNSim uses elements of TARVOS simulator, Copyright (C) 2005, 2006, 2007 Marcos Portnoi. </dd></dl>
<dl class="section user"><dt></dt><dd>This file is part of QCNSim. QCNSim is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.<br/>
 QCNSim is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.<br/>
 You should have received a copy of the GNU Lesser General Public License along with QCNSim. If not, see <a href="http://www.gnu.org/licenses/">http://www.gnu.org/licenses/</a>. </dd></dl>
<dl class="section user"><dt>Description</dt><dd>The Traffic Generator class is a parent class for classes that generate traffic for the simulator. A traffic generator is typically an event generator, which generates events in time distributed according to some probability distribution. For instance, we would have exponential traffic generator, constant traffic generator, pareto traffic generator, gaussian traffic generator, random traffic generator.</dd></dl>
<p>The Traffic Generator is also a child of <a class="el" href="class_entity.html" title="Entity class. ">Entity</a> abstract class, such that Traffic Generators can be included as entities into tokens, events, etc. Common, for all child classes, are reference members to scheduler, such that the traffic generators can schedule their events directly. </p>

<p>Definition at line <a class="el" href="_traffic_generator_8h_source.html#l00042">42</a> of file <a class="el" href="_traffic_generator_8h_source.html">TrafficGenerator.h</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a6fcdb1ce1b3fb4f35c021ea8b99f6cf5"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">TrafficGenerator::TrafficGenerator </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_simulator_globals.html">SimulatorGlobals</a> &amp;&#160;</td>
          <td class="paramname"><em>simulatorGlobals</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_scheduler.html">Scheduler</a> &amp;&#160;</td>
          <td class="paramname"><em>scheduler</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="_event_type_8h.html#a2628ea8d12e8b2563c32f05dc7fff6fa">EventType</a>&#160;</td>
          <td class="paramname"><em>eventType</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::shared_ptr&lt; <a class="el" href="class_entity.html">Entity</a> &gt;&#160;</td>
          <td class="paramname"><em>tokenContents</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::shared_ptr&lt; <a class="el" href="class_entity.html">Entity</a> &gt;&#160;</td>
          <td class="paramname"><em>source</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::shared_ptr&lt; <a class="el" href="class_entity.html">Entity</a> &gt;&#160;</td>
          <td class="paramname"><em>destination</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>priority</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<dl class="section author"><dt>Author</dt><dd>Marcos Portnoi </dd></dl>
<dl class="section date"><dt>Date</dt><dd>July 2013</dd></dl>
<dl class="section copyright"><dt>Copyright</dt><dd>Copyright (C) 2013 University of Delaware. </dd>
<dd>
QCNSim uses elements of TARVOS simulator, Copyright (C) 2005, 2006, 2007 Marcos Portnoi. </dd></dl>
<dl class="section user"><dt></dt><dd>This file is part of QCNSim. QCNSim is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.<br/>
 QCNSim is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.<br/>
 You should have received a copy of the GNU Lesser General Public License along with QCNSim. If not, see <a href="http://www.gnu.org/licenses/">http://www.gnu.org/licenses/</a>. Constructor with parameter.</dd></dl>
<p>The seed for the random number generator is controlled by <a class="el" href="class_simulator_globals.html" title="Simulator-scope variables and parameters. ">SimulatorGlobals</a>. If none is ever specified, random_device output is used as seed. The generator is constructed off by default.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">simulatorGlobals</td><td>Reference to <a class="el" href="class_simulator_globals.html" title="Simulator-scope variables and parameters. ">SimulatorGlobals</a> object, to get random generator info. </td></tr>
    <tr><td class="paramname">scheduler</td><td>Reference to <a class="el" href="class_scheduler.html" title="Scheduler class. ">Scheduler</a> object, such that traffic generators may schedule their events. </td></tr>
    <tr><td class="paramname">eventType</td><td><a class="el" href="class_event.html" title="Event class. ">Event</a> type that this generator will produce. </td></tr>
    <tr><td class="paramname">tokenContents</td><td>Reference to <a class="el" href="class_entity.html" title="Entity class. ">Entity</a> object that will be carried by the token. </td></tr>
    <tr><td class="paramname">source</td><td><a class="el" href="class_entity.html" title="Entity class. ">Entity</a> to which the generator is attached (to which tokens are generated). </td></tr>
    <tr><td class="paramname">destination</td><td>Destination entity, to which the generated tokens will be sent. </td></tr>
    <tr><td class="paramname">priority</td><td><a class="el" href="class_token.html" title="Token class. ">Token</a> priority. Higher priority, higher number. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_traffic_generator_8cpp_source.html#l00037">37</a> of file <a class="el" href="_traffic_generator_8cpp_source.html">TrafficGenerator.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;                                                                                      : <a class="code" href="class_traffic_generator.html#a9569cd494b926b84f384c7380349d51a">scheduler</a>(scheduler), <a class="code" href="class_traffic_generator.html#a42261ccf207f61a401473a106bc0bae3">simulatorGlobals</a>(simulatorGlobals), <a class="code" href="class_traffic_generator.html#a84eef27cdbfa66bbf8c14e0128196a62">eventType</a>(<a class="code" href="class_traffic_generator.html#a84eef27cdbfa66bbf8c14e0128196a62">eventType</a>),</div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;        <a class="code" href="class_traffic_generator.html#acb5d8009cf49ff99a6fee75ec456e166">tokenContents</a>(<a class="code" href="class_traffic_generator.html#acb5d8009cf49ff99a6fee75ec456e166">tokenContents</a>), <a class="code" href="class_traffic_generator.html#a4f69b85034831c2c40e789b0c0e11511">source</a>(<a class="code" href="class_traffic_generator.html#a4f69b85034831c2c40e789b0c0e11511">source</a>), <a class="code" href="class_traffic_generator.html#a6ba09ea9c5df93de64af75886df0b11b">destination</a>(<a class="code" href="class_traffic_generator.html#a6ba09ea9c5df93de64af75886df0b11b">destination</a>), <a class="code" href="class_traffic_generator.html#a2158c9e714171e5a04032571021b23c4">priority</a>(<a class="code" href="class_traffic_generator.html#a2158c9e714171e5a04032571021b23c4">priority</a>), <a class="code" href="class_traffic_generator.html#aaa73cfc4e885ecfeecbe894efd232493">isOn</a>(<span class="keyword">false</span>), <a class="code" href="class_traffic_generator.html#a29c9cdcb113742700e3f7fcbcb7ee325">tokensGeneratedCount</a>(0) {</div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;}</div>
<div class="ttc" id="class_traffic_generator_html_a29c9cdcb113742700e3f7fcbcb7ee325"><div class="ttname"><a href="class_traffic_generator.html#a29c9cdcb113742700e3f7fcbcb7ee325">TrafficGenerator::tokensGeneratedCount</a></div><div class="ttdeci">unsigned int tokensGeneratedCount</div><div class="ttdoc">Count of tokens (events) generated by this traffic generator. </div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8h_source.html#l00052">TrafficGenerator.h:52</a></div></div>
<div class="ttc" id="class_traffic_generator_html_a42261ccf207f61a401473a106bc0bae3"><div class="ttname"><a href="class_traffic_generator.html#a42261ccf207f61a401473a106bc0bae3">TrafficGenerator::simulatorGlobals</a></div><div class="ttdeci">SimulatorGlobals &amp; simulatorGlobals</div><div class="ttdoc">Reference to SimulatorGlobals object, to get random generator info. </div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8h_source.html#l00045">TrafficGenerator.h:45</a></div></div>
<div class="ttc" id="class_traffic_generator_html_a84eef27cdbfa66bbf8c14e0128196a62"><div class="ttname"><a href="class_traffic_generator.html#a84eef27cdbfa66bbf8c14e0128196a62">TrafficGenerator::eventType</a></div><div class="ttdeci">EventType eventType</div><div class="ttdoc">Event type that this generator will produce. </div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8h_source.html#l00046">TrafficGenerator.h:46</a></div></div>
<div class="ttc" id="class_traffic_generator_html_aaa73cfc4e885ecfeecbe894efd232493"><div class="ttname"><a href="class_traffic_generator.html#aaa73cfc4e885ecfeecbe894efd232493">TrafficGenerator::isOn</a></div><div class="ttdeci">bool isOn</div><div class="ttdoc">True if generator is on (and generating traffic); false if generator is off. </div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8h_source.html#l00051">TrafficGenerator.h:51</a></div></div>
<div class="ttc" id="class_traffic_generator_html_acb5d8009cf49ff99a6fee75ec456e166"><div class="ttname"><a href="class_traffic_generator.html#acb5d8009cf49ff99a6fee75ec456e166">TrafficGenerator::tokenContents</a></div><div class="ttdeci">std::shared_ptr&lt; Entity &gt; tokenContents</div><div class="ttdoc">Reference to Entity object that will be carried by the token. </div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8h_source.html#l00047">TrafficGenerator.h:47</a></div></div>
<div class="ttc" id="class_traffic_generator_html_a9569cd494b926b84f384c7380349d51a"><div class="ttname"><a href="class_traffic_generator.html#a9569cd494b926b84f384c7380349d51a">TrafficGenerator::scheduler</a></div><div class="ttdeci">Scheduler &amp; scheduler</div><div class="ttdoc">Reference to Scheduler object, such that traffic generators may schedule their events. </div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8h_source.html#l00044">TrafficGenerator.h:44</a></div></div>
<div class="ttc" id="class_traffic_generator_html_a2158c9e714171e5a04032571021b23c4"><div class="ttname"><a href="class_traffic_generator.html#a2158c9e714171e5a04032571021b23c4">TrafficGenerator::priority</a></div><div class="ttdeci">int priority</div><div class="ttdoc">Token priority. Higher priority, higher number. </div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8h_source.html#l00050">TrafficGenerator.h:50</a></div></div>
<div class="ttc" id="class_traffic_generator_html_a4f69b85034831c2c40e789b0c0e11511"><div class="ttname"><a href="class_traffic_generator.html#a4f69b85034831c2c40e789b0c0e11511">TrafficGenerator::source</a></div><div class="ttdeci">std::shared_ptr&lt; Entity &gt; source</div><div class="ttdoc">Entity to which the generator is attached (to which tokens are generated). </div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8h_source.html#l00048">TrafficGenerator.h:48</a></div></div>
<div class="ttc" id="class_traffic_generator_html_a6ba09ea9c5df93de64af75886df0b11b"><div class="ttname"><a href="class_traffic_generator.html#a6ba09ea9c5df93de64af75886df0b11b">TrafficGenerator::destination</a></div><div class="ttdeci">std::shared_ptr&lt; Entity &gt; destination</div><div class="ttdoc">Destination entity, to which the generated tokens will be sent. </div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8h_source.html#l00049">TrafficGenerator.h:49</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="aa805566ed505ad0f90982610bcf3869a"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">TrafficGenerator::TrafficGenerator </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_simulator_globals.html">SimulatorGlobals</a> &amp;&#160;</td>
          <td class="paramname"><em>simulatorGlobals</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_scheduler.html">Scheduler</a> &amp;&#160;</td>
          <td class="paramname"><em>scheduler</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="_event_type_8h.html#a2628ea8d12e8b2563c32f05dc7fff6fa">EventType</a>&#160;</td>
          <td class="paramname"><em>eventType</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::shared_ptr&lt; <a class="el" href="class_entity.html">Entity</a> &gt;&#160;</td>
          <td class="paramname"><em>tokenContents</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::shared_ptr&lt; <a class="el" href="class_entity.html">Entity</a> &gt;&#160;</td>
          <td class="paramname"><em>source</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::shared_ptr&lt; <a class="el" href="class_entity.html">Entity</a> &gt;&#160;</td>
          <td class="paramname"><em>destination</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>priority</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&#160;</td>
          <td class="paramname"><em>seed</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Constructor with parameters, seed as parameter.</p>
<p>Seed is defined here from parameters. The generator is constructed off by default.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">simulatorGlobals</td><td>Reference to <a class="el" href="class_simulator_globals.html" title="Simulator-scope variables and parameters. ">SimulatorGlobals</a> object, to get random generator info. </td></tr>
    <tr><td class="paramname">scheduler</td><td>Reference to <a class="el" href="class_scheduler.html" title="Scheduler class. ">Scheduler</a> object, such that traffic generators may schedule their events. </td></tr>
    <tr><td class="paramname">eventType</td><td><a class="el" href="class_event.html" title="Event class. ">Event</a> type that this generator will produce. </td></tr>
    <tr><td class="paramname">tokenContents</td><td>Reference to <a class="el" href="class_entity.html" title="Entity class. ">Entity</a> object that will be carried by the token. </td></tr>
    <tr><td class="paramname">source</td><td><a class="el" href="class_entity.html" title="Entity class. ">Entity</a> to which the generator is attached (to which tokens are generated). </td></tr>
    <tr><td class="paramname">destination</td><td>Destination entity, to which the generated tokens will be sent. </td></tr>
    <tr><td class="paramname">priority</td><td><a class="el" href="class_token.html" title="Token class. ">Token</a> priority. Higher priority, higher number. </td></tr>
    <tr><td class="paramname">seed</td><td>Seed to the default random number generator, to be passed to <a class="el" href="class_simulator_globals.html" title="Simulator-scope variables and parameters. ">SimulatorGlobals</a> object. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_traffic_generator_8cpp_source.html#l00057">57</a> of file <a class="el" href="_traffic_generator_8cpp_source.html">TrafficGenerator.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;                                                                                                         : <a class="code" href="class_traffic_generator.html#a9569cd494b926b84f384c7380349d51a">scheduler</a>(scheduler), <a class="code" href="class_traffic_generator.html#a42261ccf207f61a401473a106bc0bae3">simulatorGlobals</a>(simulatorGlobals), <a class="code" href="class_traffic_generator.html#a84eef27cdbfa66bbf8c14e0128196a62">eventType</a>(<a class="code" href="class_traffic_generator.html#a84eef27cdbfa66bbf8c14e0128196a62">eventType</a>),</div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;        <a class="code" href="class_traffic_generator.html#acb5d8009cf49ff99a6fee75ec456e166">tokenContents</a>(<a class="code" href="class_traffic_generator.html#acb5d8009cf49ff99a6fee75ec456e166">tokenContents</a>), <a class="code" href="class_traffic_generator.html#a4f69b85034831c2c40e789b0c0e11511">source</a>(<a class="code" href="class_traffic_generator.html#a4f69b85034831c2c40e789b0c0e11511">source</a>), <a class="code" href="class_traffic_generator.html#a6ba09ea9c5df93de64af75886df0b11b">destination</a>(<a class="code" href="class_traffic_generator.html#a6ba09ea9c5df93de64af75886df0b11b">destination</a>), <a class="code" href="class_traffic_generator.html#a2158c9e714171e5a04032571021b23c4">priority</a>(<a class="code" href="class_traffic_generator.html#a2158c9e714171e5a04032571021b23c4">priority</a>), <a class="code" href="class_traffic_generator.html#aaa73cfc4e885ecfeecbe894efd232493">isOn</a>(<span class="keyword">false</span>), <a class="code" href="class_traffic_generator.html#a29c9cdcb113742700e3f7fcbcb7ee325">tokensGeneratedCount</a>(0) {</div>
<div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;    simulatorGlobals.<a class="code" href="class_simulator_globals.html#a4f30b6252c3682679c05233afbc0604d">seedRandomNumberGenerator</a>(seed);</div>
<div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;}</div>
<div class="ttc" id="class_traffic_generator_html_a29c9cdcb113742700e3f7fcbcb7ee325"><div class="ttname"><a href="class_traffic_generator.html#a29c9cdcb113742700e3f7fcbcb7ee325">TrafficGenerator::tokensGeneratedCount</a></div><div class="ttdeci">unsigned int tokensGeneratedCount</div><div class="ttdoc">Count of tokens (events) generated by this traffic generator. </div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8h_source.html#l00052">TrafficGenerator.h:52</a></div></div>
<div class="ttc" id="class_traffic_generator_html_a42261ccf207f61a401473a106bc0bae3"><div class="ttname"><a href="class_traffic_generator.html#a42261ccf207f61a401473a106bc0bae3">TrafficGenerator::simulatorGlobals</a></div><div class="ttdeci">SimulatorGlobals &amp; simulatorGlobals</div><div class="ttdoc">Reference to SimulatorGlobals object, to get random generator info. </div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8h_source.html#l00045">TrafficGenerator.h:45</a></div></div>
<div class="ttc" id="class_traffic_generator_html_a84eef27cdbfa66bbf8c14e0128196a62"><div class="ttname"><a href="class_traffic_generator.html#a84eef27cdbfa66bbf8c14e0128196a62">TrafficGenerator::eventType</a></div><div class="ttdeci">EventType eventType</div><div class="ttdoc">Event type that this generator will produce. </div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8h_source.html#l00046">TrafficGenerator.h:46</a></div></div>
<div class="ttc" id="class_traffic_generator_html_aaa73cfc4e885ecfeecbe894efd232493"><div class="ttname"><a href="class_traffic_generator.html#aaa73cfc4e885ecfeecbe894efd232493">TrafficGenerator::isOn</a></div><div class="ttdeci">bool isOn</div><div class="ttdoc">True if generator is on (and generating traffic); false if generator is off. </div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8h_source.html#l00051">TrafficGenerator.h:51</a></div></div>
<div class="ttc" id="class_traffic_generator_html_acb5d8009cf49ff99a6fee75ec456e166"><div class="ttname"><a href="class_traffic_generator.html#acb5d8009cf49ff99a6fee75ec456e166">TrafficGenerator::tokenContents</a></div><div class="ttdeci">std::shared_ptr&lt; Entity &gt; tokenContents</div><div class="ttdoc">Reference to Entity object that will be carried by the token. </div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8h_source.html#l00047">TrafficGenerator.h:47</a></div></div>
<div class="ttc" id="class_traffic_generator_html_a9569cd494b926b84f384c7380349d51a"><div class="ttname"><a href="class_traffic_generator.html#a9569cd494b926b84f384c7380349d51a">TrafficGenerator::scheduler</a></div><div class="ttdeci">Scheduler &amp; scheduler</div><div class="ttdoc">Reference to Scheduler object, such that traffic generators may schedule their events. </div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8h_source.html#l00044">TrafficGenerator.h:44</a></div></div>
<div class="ttc" id="class_traffic_generator_html_a2158c9e714171e5a04032571021b23c4"><div class="ttname"><a href="class_traffic_generator.html#a2158c9e714171e5a04032571021b23c4">TrafficGenerator::priority</a></div><div class="ttdeci">int priority</div><div class="ttdoc">Token priority. Higher priority, higher number. </div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8h_source.html#l00050">TrafficGenerator.h:50</a></div></div>
<div class="ttc" id="class_simulator_globals_html_a4f30b6252c3682679c05233afbc0604d"><div class="ttname"><a href="class_simulator_globals.html#a4f30b6252c3682679c05233afbc0604d">SimulatorGlobals::seedRandomNumberGenerator</a></div><div class="ttdeci">void seedRandomNumberGenerator(unsigned int seed)</div><div class="ttdef"><b>Definition:</b> <a href="_simulator_globals_8cpp_source.html#l00147">SimulatorGlobals.cpp:147</a></div></div>
<div class="ttc" id="class_traffic_generator_html_a4f69b85034831c2c40e789b0c0e11511"><div class="ttname"><a href="class_traffic_generator.html#a4f69b85034831c2c40e789b0c0e11511">TrafficGenerator::source</a></div><div class="ttdeci">std::shared_ptr&lt; Entity &gt; source</div><div class="ttdoc">Entity to which the generator is attached (to which tokens are generated). </div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8h_source.html#l00048">TrafficGenerator.h:48</a></div></div>
<div class="ttc" id="class_traffic_generator_html_a6ba09ea9c5df93de64af75886df0b11b"><div class="ttname"><a href="class_traffic_generator.html#a6ba09ea9c5df93de64af75886df0b11b">TrafficGenerator::destination</a></div><div class="ttdeci">std::shared_ptr&lt; Entity &gt; destination</div><div class="ttdoc">Destination entity, to which the generated tokens will be sent. </div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8h_source.html#l00049">TrafficGenerator.h:49</a></div></div>
</div><!-- fragment -->
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="aa1943a93355f1856e639a0f163413249"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::shared_ptr&lt; <a class="el" href="class_token.html">Token</a> &gt; TrafficGenerator::createInstanceTrafficEvent </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>recordRoute</em> = <code>false</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Abstract function to serve as template for child classes, to create an instance of traffic event.</p>
<p>This primary implementation only creates the token. Child classes may call this function but implement the rest, such as creating an event, and scheduling with the proper event time (generated from the appropriate probability distribution).</p>
<p>October 2013: Tokens are generated with previous = next = source to facilitate <a class="el" href="class_node.html" title="Node class. ">Node</a> forwarding.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">recordRoute</td><td>True if this generated token should record the route it follows. False otherwise. Default is false. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="class_token.html" title="Token class. ">Token</a> that was generated, per the class constructor parameters and if generator is On. Otherwise, returns nullptr. </dd></dl>

<p>Implemented in <a class="el" href="class_exponential_traffic_generator.html#a9095b69f4e9eee6c4027ab9672916157">ExponentialTrafficGenerator</a>, <a class="el" href="class_qcn_sensor_traffic_generator.html#a0995946db4b2c3bed8f6a7578aa8843e">QcnSensorTrafficGenerator</a>, <a class="el" href="class_normal_traffic_generator.html#ab3c4fe2057fcc782ea29e1242e968b93">NormalTrafficGenerator</a>, <a class="el" href="class_weibull_traffic_generator.html#a858ed0fff1a399b9b11b501e5d084319">WeibullTrafficGenerator</a>, and <a class="el" href="class_constant_rate_traffic_generator.html#a446a16fedee30afbcb18ecb98f0457cf">ConstantRateTrafficGenerator</a>.</p>

<p>Definition at line <a class="el" href="_traffic_generator_8cpp_source.html#l00075">75</a> of file <a class="el" href="_traffic_generator_8cpp_source.html">TrafficGenerator.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;                                                                                  {</div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;    <span class="comment">// Creates a token and assigns it class member values and a unique ID obtained from simulatorGlobals.</span></div>
<div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;    <span class="keywordflow">if</span> (<a class="code" href="class_traffic_generator.html#aaa73cfc4e885ecfeecbe894efd232493">isOn</a>) {</div>
<div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;        std::shared_ptr&lt;Token&gt; token(<span class="keyword">new</span> <a class="code" href="class_token.html">Token</a>(<a class="code" href="class_traffic_generator.html#a42261ccf207f61a401473a106bc0bae3">simulatorGlobals</a>, this-&gt;<a class="code" href="class_traffic_generator.html#a2158c9e714171e5a04032571021b23c4">priority</a>, this-&gt;<a class="code" href="class_traffic_generator.html#acb5d8009cf49ff99a6fee75ec456e166">tokenContents</a>, this-&gt;<a class="code" href="class_traffic_generator.html#a4f69b85034831c2c40e789b0c0e11511">source</a>, this-&gt;<a class="code" href="class_traffic_generator.html#a6ba09ea9c5df93de64af75886df0b11b">destination</a>, this-&gt;<a class="code" href="class_traffic_generator.html#a4f69b85034831c2c40e789b0c0e11511">source</a>, this-&gt;<a class="code" href="class_traffic_generator.html#a4f69b85034831c2c40e789b0c0e11511">source</a>));</div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;        <span class="keywordflow">if</span> (recordRoute) {</div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;            token-&gt;setRecordThisRoute();</div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;        }</div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;        ++<a class="code" href="class_traffic_generator.html#a29c9cdcb113742700e3f7fcbcb7ee325">tokensGeneratedCount</a>; <span class="comment">// One more token generated.</span></div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;        <span class="keywordflow">return</span> token;</div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;    } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;        <span class="keywordflow">return</span> <span class="keyword">nullptr</span>;</div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;    }</div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;}</div>
<div class="ttc" id="class_token_html"><div class="ttname"><a href="class_token.html">Token</a></div><div class="ttdoc">Token class. </div><div class="ttdef"><b>Definition:</b> <a href="_token_8h_source.html#l00044">Token.h:44</a></div></div>
<div class="ttc" id="class_traffic_generator_html_a29c9cdcb113742700e3f7fcbcb7ee325"><div class="ttname"><a href="class_traffic_generator.html#a29c9cdcb113742700e3f7fcbcb7ee325">TrafficGenerator::tokensGeneratedCount</a></div><div class="ttdeci">unsigned int tokensGeneratedCount</div><div class="ttdoc">Count of tokens (events) generated by this traffic generator. </div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8h_source.html#l00052">TrafficGenerator.h:52</a></div></div>
<div class="ttc" id="class_traffic_generator_html_a42261ccf207f61a401473a106bc0bae3"><div class="ttname"><a href="class_traffic_generator.html#a42261ccf207f61a401473a106bc0bae3">TrafficGenerator::simulatorGlobals</a></div><div class="ttdeci">SimulatorGlobals &amp; simulatorGlobals</div><div class="ttdoc">Reference to SimulatorGlobals object, to get random generator info. </div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8h_source.html#l00045">TrafficGenerator.h:45</a></div></div>
<div class="ttc" id="class_traffic_generator_html_aaa73cfc4e885ecfeecbe894efd232493"><div class="ttname"><a href="class_traffic_generator.html#aaa73cfc4e885ecfeecbe894efd232493">TrafficGenerator::isOn</a></div><div class="ttdeci">bool isOn</div><div class="ttdoc">True if generator is on (and generating traffic); false if generator is off. </div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8h_source.html#l00051">TrafficGenerator.h:51</a></div></div>
<div class="ttc" id="class_traffic_generator_html_acb5d8009cf49ff99a6fee75ec456e166"><div class="ttname"><a href="class_traffic_generator.html#acb5d8009cf49ff99a6fee75ec456e166">TrafficGenerator::tokenContents</a></div><div class="ttdeci">std::shared_ptr&lt; Entity &gt; tokenContents</div><div class="ttdoc">Reference to Entity object that will be carried by the token. </div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8h_source.html#l00047">TrafficGenerator.h:47</a></div></div>
<div class="ttc" id="class_traffic_generator_html_a2158c9e714171e5a04032571021b23c4"><div class="ttname"><a href="class_traffic_generator.html#a2158c9e714171e5a04032571021b23c4">TrafficGenerator::priority</a></div><div class="ttdeci">int priority</div><div class="ttdoc">Token priority. Higher priority, higher number. </div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8h_source.html#l00050">TrafficGenerator.h:50</a></div></div>
<div class="ttc" id="class_traffic_generator_html_a4f69b85034831c2c40e789b0c0e11511"><div class="ttname"><a href="class_traffic_generator.html#a4f69b85034831c2c40e789b0c0e11511">TrafficGenerator::source</a></div><div class="ttdeci">std::shared_ptr&lt; Entity &gt; source</div><div class="ttdoc">Entity to which the generator is attached (to which tokens are generated). </div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8h_source.html#l00048">TrafficGenerator.h:48</a></div></div>
<div class="ttc" id="class_traffic_generator_html_a6ba09ea9c5df93de64af75886df0b11b"><div class="ttname"><a href="class_traffic_generator.html#a6ba09ea9c5df93de64af75886df0b11b">TrafficGenerator::destination</a></div><div class="ttdeci">std::shared_ptr&lt; Entity &gt; destination</div><div class="ttdoc">Destination entity, to which the generated tokens will be sent. </div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8h_source.html#l00049">TrafficGenerator.h:49</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a49bef7ab761909d3b21f057a0f24b135"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::shared_ptr&lt; <a class="el" href="class_token.html">Token</a> &gt; TrafficGenerator::createInstanceTrafficEvent </td>
          <td>(</td>
          <td class="paramtype">std::shared_ptr&lt; <a class="el" href="class_entity.html">Entity</a> &gt;&#160;</td>
          <td class="paramname"><em>tokenContents</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>recordRoute</em> = <code>false</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Abstract function to serve as template for child classes, to create an instance of traffic event with determined token contents.</p>
<p>This primary implementation only creates the token. Child classes may call this function but implement the rest, such as creating an event, and scheduling with the proper event time (generated from the appropriate probability distribution).</p>
<p>October 2013: Tokens are generated with previous = next = source to facilitate <a class="el" href="class_node.html" title="Node class. ">Node</a> forwarding.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">tokenContents</td><td>Reference to <a class="el" href="class_entity.html" title="Entity class. ">Entity</a> object that will be carried by the token. </td></tr>
    <tr><td class="paramname">recordRoute</td><td>True if this generated token should record the route it follows. False otherwise. Default is false.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="class_token.html" title="Token class. ">Token</a> that was generated, per the class constructor parameters, and if generator is On. Otherwise, returns nullptr. </dd></dl>

<p>Implemented in <a class="el" href="class_exponential_traffic_generator.html#af8bddbc12219130dad0908a2a2df76b4">ExponentialTrafficGenerator</a>, <a class="el" href="class_qcn_sensor_traffic_generator.html#a03538868aab2dc4bee73914c08b22ab2">QcnSensorTrafficGenerator</a>, <a class="el" href="class_normal_traffic_generator.html#a6e8e43ae793d48c648755321e2b44bec">NormalTrafficGenerator</a>, <a class="el" href="class_weibull_traffic_generator.html#a1ecaca94003b65b38a49673dd038c0d9">WeibullTrafficGenerator</a>, and <a class="el" href="class_constant_rate_traffic_generator.html#ad81a1b20f608e99b806174375508459e">ConstantRateTrafficGenerator</a>.</p>

<p>Definition at line <a class="el" href="_traffic_generator_8cpp_source.html#l00103">103</a> of file <a class="el" href="_traffic_generator_8cpp_source.html">TrafficGenerator.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;                                                                                                                       {</div>
<div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;    <span class="comment">// Creates a token and assigns it class member values and a unique ID obtained from simulatorGlobals. Use tokenContents from parameters.</span></div>
<div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;    <span class="keywordflow">if</span> (<a class="code" href="class_traffic_generator.html#aaa73cfc4e885ecfeecbe894efd232493">isOn</a>) {</div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;        std::shared_ptr&lt;Token&gt; token(<span class="keyword">new</span> <a class="code" href="class_token.html">Token</a>(<a class="code" href="class_traffic_generator.html#a42261ccf207f61a401473a106bc0bae3">simulatorGlobals</a>, this-&gt;<a class="code" href="class_traffic_generator.html#a2158c9e714171e5a04032571021b23c4">priority</a>, <a class="code" href="class_traffic_generator.html#acb5d8009cf49ff99a6fee75ec456e166">tokenContents</a>, this-&gt;<a class="code" href="class_traffic_generator.html#a4f69b85034831c2c40e789b0c0e11511">source</a>, this-&gt;<a class="code" href="class_traffic_generator.html#a6ba09ea9c5df93de64af75886df0b11b">destination</a>, this-&gt;<a class="code" href="class_traffic_generator.html#a4f69b85034831c2c40e789b0c0e11511">source</a>, this-&gt;<a class="code" href="class_traffic_generator.html#a4f69b85034831c2c40e789b0c0e11511">source</a>));</div>
<div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;        <span class="keywordflow">if</span> (recordRoute) {</div>
<div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;            token-&gt;setRecordThisRoute();</div>
<div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;        }</div>
<div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;        ++<a class="code" href="class_traffic_generator.html#a29c9cdcb113742700e3f7fcbcb7ee325">tokensGeneratedCount</a>; <span class="comment">// One more token generated.</span></div>
<div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;        <span class="keywordflow">return</span> token;</div>
<div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;    } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;        <span class="keywordflow">return</span> <span class="keyword">nullptr</span>;</div>
<div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;    }</div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;}</div>
<div class="ttc" id="class_token_html"><div class="ttname"><a href="class_token.html">Token</a></div><div class="ttdoc">Token class. </div><div class="ttdef"><b>Definition:</b> <a href="_token_8h_source.html#l00044">Token.h:44</a></div></div>
<div class="ttc" id="class_traffic_generator_html_a29c9cdcb113742700e3f7fcbcb7ee325"><div class="ttname"><a href="class_traffic_generator.html#a29c9cdcb113742700e3f7fcbcb7ee325">TrafficGenerator::tokensGeneratedCount</a></div><div class="ttdeci">unsigned int tokensGeneratedCount</div><div class="ttdoc">Count of tokens (events) generated by this traffic generator. </div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8h_source.html#l00052">TrafficGenerator.h:52</a></div></div>
<div class="ttc" id="class_traffic_generator_html_a42261ccf207f61a401473a106bc0bae3"><div class="ttname"><a href="class_traffic_generator.html#a42261ccf207f61a401473a106bc0bae3">TrafficGenerator::simulatorGlobals</a></div><div class="ttdeci">SimulatorGlobals &amp; simulatorGlobals</div><div class="ttdoc">Reference to SimulatorGlobals object, to get random generator info. </div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8h_source.html#l00045">TrafficGenerator.h:45</a></div></div>
<div class="ttc" id="class_traffic_generator_html_aaa73cfc4e885ecfeecbe894efd232493"><div class="ttname"><a href="class_traffic_generator.html#aaa73cfc4e885ecfeecbe894efd232493">TrafficGenerator::isOn</a></div><div class="ttdeci">bool isOn</div><div class="ttdoc">True if generator is on (and generating traffic); false if generator is off. </div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8h_source.html#l00051">TrafficGenerator.h:51</a></div></div>
<div class="ttc" id="class_traffic_generator_html_acb5d8009cf49ff99a6fee75ec456e166"><div class="ttname"><a href="class_traffic_generator.html#acb5d8009cf49ff99a6fee75ec456e166">TrafficGenerator::tokenContents</a></div><div class="ttdeci">std::shared_ptr&lt; Entity &gt; tokenContents</div><div class="ttdoc">Reference to Entity object that will be carried by the token. </div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8h_source.html#l00047">TrafficGenerator.h:47</a></div></div>
<div class="ttc" id="class_traffic_generator_html_a2158c9e714171e5a04032571021b23c4"><div class="ttname"><a href="class_traffic_generator.html#a2158c9e714171e5a04032571021b23c4">TrafficGenerator::priority</a></div><div class="ttdeci">int priority</div><div class="ttdoc">Token priority. Higher priority, higher number. </div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8h_source.html#l00050">TrafficGenerator.h:50</a></div></div>
<div class="ttc" id="class_traffic_generator_html_a4f69b85034831c2c40e789b0c0e11511"><div class="ttname"><a href="class_traffic_generator.html#a4f69b85034831c2c40e789b0c0e11511">TrafficGenerator::source</a></div><div class="ttdeci">std::shared_ptr&lt; Entity &gt; source</div><div class="ttdoc">Entity to which the generator is attached (to which tokens are generated). </div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8h_source.html#l00048">TrafficGenerator.h:48</a></div></div>
<div class="ttc" id="class_traffic_generator_html_a6ba09ea9c5df93de64af75886df0b11b"><div class="ttname"><a href="class_traffic_generator.html#a6ba09ea9c5df93de64af75886df0b11b">TrafficGenerator::destination</a></div><div class="ttdeci">std::shared_ptr&lt; Entity &gt; destination</div><div class="ttdoc">Destination entity, to which the generated tokens will be sent. </div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8h_source.html#l00049">TrafficGenerator.h:49</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="af51fd5d3e1200ae9e7d849a554647fcd"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::shared_ptr&lt; <a class="el" href="class_token.html">Token</a> &gt; TrafficGenerator::createInstanceTrafficEvent </td>
          <td>(</td>
          <td class="paramtype">std::vector&lt; std::shared_ptr&lt; <a class="el" href="class_entity.html">Entity</a> &gt;&gt;&#160;</td>
          <td class="paramname"><em>explicitRoute</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>recordRoute</em> = <code>false</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Abstract function to serve as template for child classes, to create an instance of traffic event and explicit route.</p>
<p>This primary implementation only creates the token. Child classes may call this function but implement the rest, such as creating an event, and scheduling with the proper event time (generated from the appropriate probability distribution).</p>
<p>October 2013: Tokens are generated with previous = next = source to facilitate <a class="el" href="class_node.html" title="Node class. ">Node</a> forwarding.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">explicitRoute</td><td>Vector containing a list of <a class="el" href="class_entity.html" title="Entity class. ">Entity</a> objects representing the route to be followed by a token/PDU. </td></tr>
    <tr><td class="paramname">recordRoute</td><td>True if this generated token should record the route it follows. False otherwise. Default is false.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="class_token.html" title="Token class. ">Token</a> that was generated, per the class constructor parameters and if generator is On. Otherwise, returns nullptr. </dd></dl>

<p>Implemented in <a class="el" href="class_exponential_traffic_generator.html#af7e29232e74258ac42c5d82f4200ee25">ExponentialTrafficGenerator</a>, <a class="el" href="class_qcn_sensor_traffic_generator.html#ad006b21d755b6e5c257ea848f4d2eed9">QcnSensorTrafficGenerator</a>, <a class="el" href="class_normal_traffic_generator.html#ac4096832db36a19eae5a0da2e8146902">NormalTrafficGenerator</a>, <a class="el" href="class_weibull_traffic_generator.html#aece00761b4c6aa3de78df82b7a1213d4">WeibullTrafficGenerator</a>, and <a class="el" href="class_constant_rate_traffic_generator.html#ab33d71d2137700d034cb9a0d372d39b0">ConstantRateTrafficGenerator</a>.</p>

<p>Definition at line <a class="el" href="_traffic_generator_8cpp_source.html#l00131">131</a> of file <a class="el" href="_traffic_generator_8cpp_source.html">TrafficGenerator.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;                                                                                                                                  {</div>
<div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;    <span class="comment">// Creates a token and assigns it class member values and a unique ID obtained from simulatorGlobals.</span></div>
<div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;    <span class="keywordflow">if</span> (<a class="code" href="class_traffic_generator.html#aaa73cfc4e885ecfeecbe894efd232493">isOn</a>) {</div>
<div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;        std::shared_ptr&lt;Token&gt; token(<span class="keyword">new</span> <a class="code" href="class_token.html">Token</a>(<a class="code" href="class_traffic_generator.html#a42261ccf207f61a401473a106bc0bae3">simulatorGlobals</a>, this-&gt;<a class="code" href="class_traffic_generator.html#a2158c9e714171e5a04032571021b23c4">priority</a>, this-&gt;<a class="code" href="class_traffic_generator.html#acb5d8009cf49ff99a6fee75ec456e166">tokenContents</a>, this-&gt;<a class="code" href="class_traffic_generator.html#a4f69b85034831c2c40e789b0c0e11511">source</a>, this-&gt;<a class="code" href="class_traffic_generator.html#a6ba09ea9c5df93de64af75886df0b11b">destination</a>, this-&gt;<a class="code" href="class_traffic_generator.html#a4f69b85034831c2c40e789b0c0e11511">source</a>, this-&gt;<a class="code" href="class_traffic_generator.html#a4f69b85034831c2c40e789b0c0e11511">source</a>, explicitRoute));</div>
<div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;        <span class="keywordflow">if</span> (recordRoute) {</div>
<div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;            token-&gt;setRecordThisRoute();</div>
<div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;        }</div>
<div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;        ++<a class="code" href="class_traffic_generator.html#a29c9cdcb113742700e3f7fcbcb7ee325">tokensGeneratedCount</a>; <span class="comment">// One more token generated.</span></div>
<div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;        <span class="keywordflow">return</span> token;</div>
<div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;    } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;        <span class="keywordflow">return</span> <span class="keyword">nullptr</span>;</div>
<div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;    }</div>
<div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;}</div>
<div class="ttc" id="class_token_html"><div class="ttname"><a href="class_token.html">Token</a></div><div class="ttdoc">Token class. </div><div class="ttdef"><b>Definition:</b> <a href="_token_8h_source.html#l00044">Token.h:44</a></div></div>
<div class="ttc" id="class_traffic_generator_html_a29c9cdcb113742700e3f7fcbcb7ee325"><div class="ttname"><a href="class_traffic_generator.html#a29c9cdcb113742700e3f7fcbcb7ee325">TrafficGenerator::tokensGeneratedCount</a></div><div class="ttdeci">unsigned int tokensGeneratedCount</div><div class="ttdoc">Count of tokens (events) generated by this traffic generator. </div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8h_source.html#l00052">TrafficGenerator.h:52</a></div></div>
<div class="ttc" id="class_traffic_generator_html_a42261ccf207f61a401473a106bc0bae3"><div class="ttname"><a href="class_traffic_generator.html#a42261ccf207f61a401473a106bc0bae3">TrafficGenerator::simulatorGlobals</a></div><div class="ttdeci">SimulatorGlobals &amp; simulatorGlobals</div><div class="ttdoc">Reference to SimulatorGlobals object, to get random generator info. </div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8h_source.html#l00045">TrafficGenerator.h:45</a></div></div>
<div class="ttc" id="class_traffic_generator_html_aaa73cfc4e885ecfeecbe894efd232493"><div class="ttname"><a href="class_traffic_generator.html#aaa73cfc4e885ecfeecbe894efd232493">TrafficGenerator::isOn</a></div><div class="ttdeci">bool isOn</div><div class="ttdoc">True if generator is on (and generating traffic); false if generator is off. </div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8h_source.html#l00051">TrafficGenerator.h:51</a></div></div>
<div class="ttc" id="class_traffic_generator_html_acb5d8009cf49ff99a6fee75ec456e166"><div class="ttname"><a href="class_traffic_generator.html#acb5d8009cf49ff99a6fee75ec456e166">TrafficGenerator::tokenContents</a></div><div class="ttdeci">std::shared_ptr&lt; Entity &gt; tokenContents</div><div class="ttdoc">Reference to Entity object that will be carried by the token. </div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8h_source.html#l00047">TrafficGenerator.h:47</a></div></div>
<div class="ttc" id="class_traffic_generator_html_a2158c9e714171e5a04032571021b23c4"><div class="ttname"><a href="class_traffic_generator.html#a2158c9e714171e5a04032571021b23c4">TrafficGenerator::priority</a></div><div class="ttdeci">int priority</div><div class="ttdoc">Token priority. Higher priority, higher number. </div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8h_source.html#l00050">TrafficGenerator.h:50</a></div></div>
<div class="ttc" id="class_traffic_generator_html_a4f69b85034831c2c40e789b0c0e11511"><div class="ttname"><a href="class_traffic_generator.html#a4f69b85034831c2c40e789b0c0e11511">TrafficGenerator::source</a></div><div class="ttdeci">std::shared_ptr&lt; Entity &gt; source</div><div class="ttdoc">Entity to which the generator is attached (to which tokens are generated). </div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8h_source.html#l00048">TrafficGenerator.h:48</a></div></div>
<div class="ttc" id="class_traffic_generator_html_a6ba09ea9c5df93de64af75886df0b11b"><div class="ttname"><a href="class_traffic_generator.html#a6ba09ea9c5df93de64af75886df0b11b">TrafficGenerator::destination</a></div><div class="ttdeci">std::shared_ptr&lt; Entity &gt; destination</div><div class="ttdoc">Destination entity, to which the generated tokens will be sent. </div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8h_source.html#l00049">TrafficGenerator.h:49</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="ac0ccf573b26189a81bcbb4d66b28a922"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::shared_ptr&lt; <a class="el" href="class_token.html">Token</a> &gt; TrafficGenerator::createInstanceTrafficEvent </td>
          <td>(</td>
          <td class="paramtype">std::shared_ptr&lt; <a class="el" href="class_entity.html">Entity</a> &gt;&#160;</td>
          <td class="paramname"><em>tokenContents</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::vector&lt; std::shared_ptr&lt; <a class="el" href="class_entity.html">Entity</a> &gt;&gt;&#160;</td>
          <td class="paramname"><em>explicitRoute</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>recordRoute</em> = <code>false</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Abstract function to serve as template for child classes, to create an instance of traffic event with determined token contents and explicit route.</p>
<p>This primary implementation only creates the token. Child classes may call this function but implement the rest, such as creating an event, and scheduling with the proper event time (generated from the appropriate probability distribution).</p>
<p>October 2013: Tokens are generated with previous = next = source to facilitate <a class="el" href="class_node.html" title="Node class. ">Node</a> forwarding.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">tokenContents</td><td>Reference to <a class="el" href="class_entity.html" title="Entity class. ">Entity</a> object that will be carried by the token. </td></tr>
    <tr><td class="paramname">explicitRoute</td><td>Vector containing a list of <a class="el" href="class_entity.html" title="Entity class. ">Entity</a> objects representing the route to be followed by a token/PDU. </td></tr>
    <tr><td class="paramname">recordRoute</td><td>True if this generated token should record the route it follows. False otherwise. Default is false.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="class_token.html" title="Token class. ">Token</a> that was generated, per the class constructor parameters, and if generator is On. Otherwise, returns nullptr. </dd></dl>

<p>Implemented in <a class="el" href="class_exponential_traffic_generator.html#acfc98aa272007bf6f46639aba122e12a">ExponentialTrafficGenerator</a>, <a class="el" href="class_qcn_sensor_traffic_generator.html#ace809aaedcebfa9695ec0da7b46bc83f">QcnSensorTrafficGenerator</a>, <a class="el" href="class_normal_traffic_generator.html#afdfb9c4e88a555fb020445b27330874b">NormalTrafficGenerator</a>, <a class="el" href="class_weibull_traffic_generator.html#a787464a49d4525dabd4b48475e1eaf84">WeibullTrafficGenerator</a>, and <a class="el" href="class_constant_rate_traffic_generator.html#a36affa48c090cc49ea429c975c1450c3">ConstantRateTrafficGenerator</a>.</p>

<p>Definition at line <a class="el" href="_traffic_generator_8cpp_source.html#l00160">160</a> of file <a class="el" href="_traffic_generator_8cpp_source.html">TrafficGenerator.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;                                                                                                                                                                       {</div>
<div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;    <span class="comment">// Creates a token and assigns it class member values and a unique ID obtained from simulatorGlobals. Use tokenContents from parameters.</span></div>
<div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;    <span class="keywordflow">if</span> (<a class="code" href="class_traffic_generator.html#aaa73cfc4e885ecfeecbe894efd232493">isOn</a>) {</div>
<div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;        std::shared_ptr&lt;Token&gt; token(<span class="keyword">new</span> <a class="code" href="class_token.html">Token</a>(<a class="code" href="class_traffic_generator.html#a42261ccf207f61a401473a106bc0bae3">simulatorGlobals</a>, this-&gt;<a class="code" href="class_traffic_generator.html#a2158c9e714171e5a04032571021b23c4">priority</a>, <a class="code" href="class_traffic_generator.html#acb5d8009cf49ff99a6fee75ec456e166">tokenContents</a>, this-&gt;<a class="code" href="class_traffic_generator.html#a4f69b85034831c2c40e789b0c0e11511">source</a>, this-&gt;<a class="code" href="class_traffic_generator.html#a6ba09ea9c5df93de64af75886df0b11b">destination</a>, this-&gt;<a class="code" href="class_traffic_generator.html#a4f69b85034831c2c40e789b0c0e11511">source</a>, this-&gt;<a class="code" href="class_traffic_generator.html#a4f69b85034831c2c40e789b0c0e11511">source</a>, explicitRoute));</div>
<div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;        <span class="keywordflow">if</span> (recordRoute) {</div>
<div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;            token-&gt;setRecordThisRoute();</div>
<div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;        }</div>
<div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;        ++<a class="code" href="class_traffic_generator.html#a29c9cdcb113742700e3f7fcbcb7ee325">tokensGeneratedCount</a>; <span class="comment">// One more token generated.</span></div>
<div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;        <span class="keywordflow">return</span> token;</div>
<div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;    } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;        <span class="keywordflow">return</span> <span class="keyword">nullptr</span>;</div>
<div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;    }</div>
<div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;}</div>
<div class="ttc" id="class_token_html"><div class="ttname"><a href="class_token.html">Token</a></div><div class="ttdoc">Token class. </div><div class="ttdef"><b>Definition:</b> <a href="_token_8h_source.html#l00044">Token.h:44</a></div></div>
<div class="ttc" id="class_traffic_generator_html_a29c9cdcb113742700e3f7fcbcb7ee325"><div class="ttname"><a href="class_traffic_generator.html#a29c9cdcb113742700e3f7fcbcb7ee325">TrafficGenerator::tokensGeneratedCount</a></div><div class="ttdeci">unsigned int tokensGeneratedCount</div><div class="ttdoc">Count of tokens (events) generated by this traffic generator. </div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8h_source.html#l00052">TrafficGenerator.h:52</a></div></div>
<div class="ttc" id="class_traffic_generator_html_a42261ccf207f61a401473a106bc0bae3"><div class="ttname"><a href="class_traffic_generator.html#a42261ccf207f61a401473a106bc0bae3">TrafficGenerator::simulatorGlobals</a></div><div class="ttdeci">SimulatorGlobals &amp; simulatorGlobals</div><div class="ttdoc">Reference to SimulatorGlobals object, to get random generator info. </div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8h_source.html#l00045">TrafficGenerator.h:45</a></div></div>
<div class="ttc" id="class_traffic_generator_html_aaa73cfc4e885ecfeecbe894efd232493"><div class="ttname"><a href="class_traffic_generator.html#aaa73cfc4e885ecfeecbe894efd232493">TrafficGenerator::isOn</a></div><div class="ttdeci">bool isOn</div><div class="ttdoc">True if generator is on (and generating traffic); false if generator is off. </div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8h_source.html#l00051">TrafficGenerator.h:51</a></div></div>
<div class="ttc" id="class_traffic_generator_html_acb5d8009cf49ff99a6fee75ec456e166"><div class="ttname"><a href="class_traffic_generator.html#acb5d8009cf49ff99a6fee75ec456e166">TrafficGenerator::tokenContents</a></div><div class="ttdeci">std::shared_ptr&lt; Entity &gt; tokenContents</div><div class="ttdoc">Reference to Entity object that will be carried by the token. </div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8h_source.html#l00047">TrafficGenerator.h:47</a></div></div>
<div class="ttc" id="class_traffic_generator_html_a2158c9e714171e5a04032571021b23c4"><div class="ttname"><a href="class_traffic_generator.html#a2158c9e714171e5a04032571021b23c4">TrafficGenerator::priority</a></div><div class="ttdeci">int priority</div><div class="ttdoc">Token priority. Higher priority, higher number. </div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8h_source.html#l00050">TrafficGenerator.h:50</a></div></div>
<div class="ttc" id="class_traffic_generator_html_a4f69b85034831c2c40e789b0c0e11511"><div class="ttname"><a href="class_traffic_generator.html#a4f69b85034831c2c40e789b0c0e11511">TrafficGenerator::source</a></div><div class="ttdeci">std::shared_ptr&lt; Entity &gt; source</div><div class="ttdoc">Entity to which the generator is attached (to which tokens are generated). </div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8h_source.html#l00048">TrafficGenerator.h:48</a></div></div>
<div class="ttc" id="class_traffic_generator_html_a6ba09ea9c5df93de64af75886df0b11b"><div class="ttname"><a href="class_traffic_generator.html#a6ba09ea9c5df93de64af75886df0b11b">TrafficGenerator::destination</a></div><div class="ttdeci">std::shared_ptr&lt; Entity &gt; destination</div><div class="ttdoc">Destination entity, to which the generated tokens will be sent. </div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8h_source.html#l00049">TrafficGenerator.h:49</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a4efc8d0f973cf1ea906c50e85b6e4ec7"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::shared_ptr&lt; <a class="el" href="class_protocol_data_unit.html">ProtocolDataUnit</a> &gt; TrafficGenerator::createInstanceTrafficEventPdu </td>
          <td>(</td>
          <td class="paramtype">unsigned int&#160;</td>
          <td class="paramname"><em>pduSize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>recordRoute</em> = <code>false</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Creates an instance of traffic event with PDU. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pduSize</td><td>Size of PDU to generate. </td></tr>
    <tr><td class="paramname">recordRoute</td><td>True if this generated token should record the route it follows. False otherwise. Default is false.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>PDU that was generated, per the class constructor parameters and if generator is On. Otherwise, returns nullptr. </dd></dl>

<p>Implemented in <a class="el" href="class_exponential_traffic_generator.html#a917831a1c62644aa1b04beaa401b691d">ExponentialTrafficGenerator</a>, <a class="el" href="class_qcn_sensor_traffic_generator.html#a3079900c11310c8dff41ed7126e04dd2">QcnSensorTrafficGenerator</a>, <a class="el" href="class_normal_traffic_generator.html#abfa4b83707426afdfdb7f3c830d6827c">NormalTrafficGenerator</a>, <a class="el" href="class_weibull_traffic_generator.html#a955636e3fc2818acf8cb5865c6ae0061">WeibullTrafficGenerator</a>, and <a class="el" href="class_constant_rate_traffic_generator.html#ae32f3ee33afd2117c9c1eafd040f103b">ConstantRateTrafficGenerator</a>.</p>

<p>Definition at line <a class="el" href="_traffic_generator_8cpp_source.html#l00279">279</a> of file <a class="el" href="_traffic_generator_8cpp_source.html">TrafficGenerator.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00279"></a><span class="lineno">  279</span>&#160;                                                                                                                      {</div>
<div class="line"><a name="l00280"></a><span class="lineno">  280</span>&#160;    <span class="keywordflow">if</span> (<a class="code" href="class_traffic_generator.html#aaa73cfc4e885ecfeecbe894efd232493">isOn</a>) {</div>
<div class="line"><a name="l00281"></a><span class="lineno">  281</span>&#160;        std::shared_ptr&lt;ProtocolDataUnit&gt; pdu(<span class="keyword">new</span> <a class="code" href="class_protocol_data_unit.html">ProtocolDataUnit</a>(<a class="code" href="class_traffic_generator.html#aa1943a93355f1856e639a0f163413249">createInstanceTrafficEvent</a>(recordRoute), pduSize));</div>
<div class="line"><a name="l00282"></a><span class="lineno">  282</span>&#160;        <span class="keywordflow">return</span> pdu;</div>
<div class="line"><a name="l00283"></a><span class="lineno">  283</span>&#160;    } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00284"></a><span class="lineno">  284</span>&#160;        <span class="keywordflow">return</span> <span class="keyword">nullptr</span>;</div>
<div class="line"><a name="l00285"></a><span class="lineno">  285</span>&#160;    }</div>
<div class="line"><a name="l00286"></a><span class="lineno">  286</span>&#160;}</div>
<div class="ttc" id="class_protocol_data_unit_html"><div class="ttname"><a href="class_protocol_data_unit.html">ProtocolDataUnit</a></div><div class="ttdoc">Protocol Data Unit class. </div><div class="ttdef"><b>Definition:</b> <a href="_protocol_data_unit_8h_source.html#l00033">ProtocolDataUnit.h:33</a></div></div>
<div class="ttc" id="class_traffic_generator_html_aa1943a93355f1856e639a0f163413249"><div class="ttname"><a href="class_traffic_generator.html#aa1943a93355f1856e639a0f163413249">TrafficGenerator::createInstanceTrafficEvent</a></div><div class="ttdeci">virtual std::shared_ptr&lt; Token &gt; createInstanceTrafficEvent(bool recordRoute=false)=0</div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8cpp_source.html#l00075">TrafficGenerator.cpp:75</a></div></div>
<div class="ttc" id="class_traffic_generator_html_aaa73cfc4e885ecfeecbe894efd232493"><div class="ttname"><a href="class_traffic_generator.html#aaa73cfc4e885ecfeecbe894efd232493">TrafficGenerator::isOn</a></div><div class="ttdeci">bool isOn</div><div class="ttdoc">True if generator is on (and generating traffic); false if generator is off. </div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8h_source.html#l00051">TrafficGenerator.h:51</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="ae439634e20e6b7844a0269d6baea7e6c"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::shared_ptr&lt; <a class="el" href="class_protocol_data_unit.html">ProtocolDataUnit</a> &gt; TrafficGenerator::createInstanceTrafficEventPdu </td>
          <td>(</td>
          <td class="paramtype">unsigned int&#160;</td>
          <td class="paramname"><em>pduSize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::shared_ptr&lt; <a class="el" href="class_entity.html">Entity</a> &gt;&#160;</td>
          <td class="paramname"><em>pduContents</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>recordRoute</em> = <code>false</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Creates an instance of traffic event. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pduSize</td><td>Size of PDU to generate. </td></tr>
    <tr><td class="paramname">pduContents</td><td>Reference to <a class="el" href="class_entity.html" title="Entity class. ">Entity</a> object that will be carried by the token. </td></tr>
    <tr><td class="paramname">recordRoute</td><td>True if this generated token should record the route it follows. False otherwise. Default is false.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>PDU that was generated, per the class constructor parameters and if generator is On. Otherwise, returns nullptr. </dd></dl>

<p>Implemented in <a class="el" href="class_exponential_traffic_generator.html#ad15ce961a2b52786b83ecea370a4ea7c">ExponentialTrafficGenerator</a>, <a class="el" href="class_qcn_sensor_traffic_generator.html#a56e864a5493086b7778bb0945fa4d070">QcnSensorTrafficGenerator</a>, <a class="el" href="class_normal_traffic_generator.html#a81bdf773787a0dd7d5fc7eb9ab706829">NormalTrafficGenerator</a>, <a class="el" href="class_weibull_traffic_generator.html#aba44eeeb0ccdb2c52b75958dd41158dd">WeibullTrafficGenerator</a>, and <a class="el" href="class_constant_rate_traffic_generator.html#af6e04c1cdc6d0065ff57832edbda2921">ConstantRateTrafficGenerator</a>.</p>

<p>Definition at line <a class="el" href="_traffic_generator_8cpp_source.html#l00297">297</a> of file <a class="el" href="_traffic_generator_8cpp_source.html">TrafficGenerator.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00297"></a><span class="lineno">  297</span>&#160;                                                                                                                                                         {</div>
<div class="line"><a name="l00298"></a><span class="lineno">  298</span>&#160;    <span class="keywordflow">if</span> (<a class="code" href="class_traffic_generator.html#aaa73cfc4e885ecfeecbe894efd232493">isOn</a>) {</div>
<div class="line"><a name="l00299"></a><span class="lineno">  299</span>&#160;        std::shared_ptr&lt;ProtocolDataUnit&gt; pdu(<span class="keyword">new</span> <a class="code" href="class_protocol_data_unit.html">ProtocolDataUnit</a>(<a class="code" href="class_traffic_generator.html#aa1943a93355f1856e639a0f163413249">createInstanceTrafficEvent</a>(pduContents, recordRoute), pduSize));</div>
<div class="line"><a name="l00300"></a><span class="lineno">  300</span>&#160;        <span class="keywordflow">return</span> pdu;</div>
<div class="line"><a name="l00301"></a><span class="lineno">  301</span>&#160;    } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00302"></a><span class="lineno">  302</span>&#160;        <span class="keywordflow">return</span> <span class="keyword">nullptr</span>;</div>
<div class="line"><a name="l00303"></a><span class="lineno">  303</span>&#160;    }</div>
<div class="line"><a name="l00304"></a><span class="lineno">  304</span>&#160;}</div>
<div class="ttc" id="class_protocol_data_unit_html"><div class="ttname"><a href="class_protocol_data_unit.html">ProtocolDataUnit</a></div><div class="ttdoc">Protocol Data Unit class. </div><div class="ttdef"><b>Definition:</b> <a href="_protocol_data_unit_8h_source.html#l00033">ProtocolDataUnit.h:33</a></div></div>
<div class="ttc" id="class_traffic_generator_html_aa1943a93355f1856e639a0f163413249"><div class="ttname"><a href="class_traffic_generator.html#aa1943a93355f1856e639a0f163413249">TrafficGenerator::createInstanceTrafficEvent</a></div><div class="ttdeci">virtual std::shared_ptr&lt; Token &gt; createInstanceTrafficEvent(bool recordRoute=false)=0</div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8cpp_source.html#l00075">TrafficGenerator.cpp:75</a></div></div>
<div class="ttc" id="class_traffic_generator_html_aaa73cfc4e885ecfeecbe894efd232493"><div class="ttname"><a href="class_traffic_generator.html#aaa73cfc4e885ecfeecbe894efd232493">TrafficGenerator::isOn</a></div><div class="ttdeci">bool isOn</div><div class="ttdoc">True if generator is on (and generating traffic); false if generator is off. </div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8h_source.html#l00051">TrafficGenerator.h:51</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a39ab5cd8466b7d2685442000b48070a9"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::shared_ptr&lt; <a class="el" href="class_protocol_data_unit.html">ProtocolDataUnit</a> &gt; TrafficGenerator::createInstanceTrafficEventPdu </td>
          <td>(</td>
          <td class="paramtype">unsigned int&#160;</td>
          <td class="paramname"><em>pduSize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::vector&lt; std::shared_ptr&lt; <a class="el" href="class_entity.html">Entity</a> &gt;&gt;&#160;</td>
          <td class="paramname"><em>explicitRoute</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>recordRoute</em> = <code>false</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Creates an instance of traffic event. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pduSize</td><td>Size of PDU to generate. </td></tr>
    <tr><td class="paramname">explicitRoute</td><td>Vector containing a list of <a class="el" href="class_entity.html" title="Entity class. ">Entity</a> objects representing the route to be followed by a token/PDU. </td></tr>
    <tr><td class="paramname">recordRoute</td><td>True if this generated token should record the route it follows. False otherwise. Default is false.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>PDU that was generated, per the class constructor parameters and if generator is On. Otherwise, returns nullptr. </dd></dl>

<p>Implemented in <a class="el" href="class_exponential_traffic_generator.html#a24d3daad5db81b0242a2be43b9158f4d">ExponentialTrafficGenerator</a>, <a class="el" href="class_qcn_sensor_traffic_generator.html#adae8db3855f6b39f9fd769ecbdd139df">QcnSensorTrafficGenerator</a>, <a class="el" href="class_normal_traffic_generator.html#a9c44b5f39abaafee57ec4819912492b1">NormalTrafficGenerator</a>, <a class="el" href="class_weibull_traffic_generator.html#a2c413db48df4cc0e8fb18d048ea18ee2">WeibullTrafficGenerator</a>, and <a class="el" href="class_constant_rate_traffic_generator.html#aa8d7770fcb50e452480ec5ee1bc057e3">ConstantRateTrafficGenerator</a>.</p>

<p>Definition at line <a class="el" href="_traffic_generator_8cpp_source.html#l00315">315</a> of file <a class="el" href="_traffic_generator_8cpp_source.html">TrafficGenerator.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00316"></a><span class="lineno">  316</span>&#160;                                                                                                    {</div>
<div class="line"><a name="l00317"></a><span class="lineno">  317</span>&#160;    <span class="keywordflow">if</span> (<a class="code" href="class_traffic_generator.html#aaa73cfc4e885ecfeecbe894efd232493">isOn</a>) {</div>
<div class="line"><a name="l00318"></a><span class="lineno">  318</span>&#160;        std::shared_ptr&lt;ProtocolDataUnit&gt; pdu(<span class="keyword">new</span> <a class="code" href="class_protocol_data_unit.html">ProtocolDataUnit</a>(<a class="code" href="class_traffic_generator.html#aa1943a93355f1856e639a0f163413249">createInstanceTrafficEvent</a>(explicitRoute, recordRoute), pduSize));</div>
<div class="line"><a name="l00319"></a><span class="lineno">  319</span>&#160;        <span class="keywordflow">return</span> pdu;</div>
<div class="line"><a name="l00320"></a><span class="lineno">  320</span>&#160;    } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00321"></a><span class="lineno">  321</span>&#160;        <span class="keywordflow">return</span> <span class="keyword">nullptr</span>;</div>
<div class="line"><a name="l00322"></a><span class="lineno">  322</span>&#160;    }</div>
<div class="line"><a name="l00323"></a><span class="lineno">  323</span>&#160;}</div>
<div class="ttc" id="class_protocol_data_unit_html"><div class="ttname"><a href="class_protocol_data_unit.html">ProtocolDataUnit</a></div><div class="ttdoc">Protocol Data Unit class. </div><div class="ttdef"><b>Definition:</b> <a href="_protocol_data_unit_8h_source.html#l00033">ProtocolDataUnit.h:33</a></div></div>
<div class="ttc" id="class_traffic_generator_html_aa1943a93355f1856e639a0f163413249"><div class="ttname"><a href="class_traffic_generator.html#aa1943a93355f1856e639a0f163413249">TrafficGenerator::createInstanceTrafficEvent</a></div><div class="ttdeci">virtual std::shared_ptr&lt; Token &gt; createInstanceTrafficEvent(bool recordRoute=false)=0</div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8cpp_source.html#l00075">TrafficGenerator.cpp:75</a></div></div>
<div class="ttc" id="class_traffic_generator_html_aaa73cfc4e885ecfeecbe894efd232493"><div class="ttname"><a href="class_traffic_generator.html#aaa73cfc4e885ecfeecbe894efd232493">TrafficGenerator::isOn</a></div><div class="ttdeci">bool isOn</div><div class="ttdoc">True if generator is on (and generating traffic); false if generator is off. </div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8h_source.html#l00051">TrafficGenerator.h:51</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a058d0a28ed8206bc5b8295498673fefe"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::shared_ptr&lt; <a class="el" href="class_protocol_data_unit.html">ProtocolDataUnit</a> &gt; TrafficGenerator::createInstanceTrafficEventPdu </td>
          <td>(</td>
          <td class="paramtype">unsigned int&#160;</td>
          <td class="paramname"><em>pduSize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::shared_ptr&lt; <a class="el" href="class_entity.html">Entity</a> &gt;&#160;</td>
          <td class="paramname"><em>tokenContents</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::vector&lt; std::shared_ptr&lt; <a class="el" href="class_entity.html">Entity</a> &gt;&gt;&#160;</td>
          <td class="paramname"><em>explicitRoute</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>recordRoute</em> = <code>false</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Creates an instance of traffic event. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pduSize</td><td>Size of PDU to generate. </td></tr>
    <tr><td class="paramname">tokenContents</td><td>Reference to <a class="el" href="class_entity.html" title="Entity class. ">Entity</a> object that will be carried by the token. </td></tr>
    <tr><td class="paramname">explicitRoute</td><td>Vector containing a list of <a class="el" href="class_entity.html" title="Entity class. ">Entity</a> objects representing the route to be followed by a token/PDU. </td></tr>
    <tr><td class="paramname">recordRoute</td><td>True if this generated token should record the route it follows. False otherwise. Default is false.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>PDU that was generated, per the class constructor parameters and if generator is On. Otherwise, returns nullptr. </dd></dl>

<p>Implemented in <a class="el" href="class_exponential_traffic_generator.html#a8fd1c69c9243af8bf41df11c7475fb20">ExponentialTrafficGenerator</a>, <a class="el" href="class_qcn_sensor_traffic_generator.html#ac00c0a9f03e0651da6ddb33f0a062af5">QcnSensorTrafficGenerator</a>, <a class="el" href="class_normal_traffic_generator.html#aee0230df65d1586208b3d73110121038">NormalTrafficGenerator</a>, <a class="el" href="class_weibull_traffic_generator.html#a5b8c9ae749b07e0ee02a82480fbd6a35">WeibullTrafficGenerator</a>, and <a class="el" href="class_constant_rate_traffic_generator.html#ae5c79bec7f8c30b70c6e7b8ee8e1c04f">ConstantRateTrafficGenerator</a>.</p>

<p>Definition at line <a class="el" href="_traffic_generator_8cpp_source.html#l00335">335</a> of file <a class="el" href="_traffic_generator_8cpp_source.html">TrafficGenerator.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00337"></a><span class="lineno">  337</span>&#160;                                                                                                             {</div>
<div class="line"><a name="l00338"></a><span class="lineno">  338</span>&#160;    <span class="keywordflow">if</span> (<a class="code" href="class_traffic_generator.html#aaa73cfc4e885ecfeecbe894efd232493">isOn</a>) {</div>
<div class="line"><a name="l00339"></a><span class="lineno">  339</span>&#160;        std::shared_ptr&lt;ProtocolDataUnit&gt; pdu(<span class="keyword">new</span> <a class="code" href="class_protocol_data_unit.html">ProtocolDataUnit</a>(<a class="code" href="class_traffic_generator.html#aa1943a93355f1856e639a0f163413249">createInstanceTrafficEvent</a>(<a class="code" href="class_traffic_generator.html#acb5d8009cf49ff99a6fee75ec456e166">tokenContents</a>, explicitRoute, recordRoute), pduSize));</div>
<div class="line"><a name="l00340"></a><span class="lineno">  340</span>&#160;        <span class="keywordflow">return</span> pdu;</div>
<div class="line"><a name="l00341"></a><span class="lineno">  341</span>&#160;    } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00342"></a><span class="lineno">  342</span>&#160;        <span class="keywordflow">return</span> <span class="keyword">nullptr</span>;</div>
<div class="line"><a name="l00343"></a><span class="lineno">  343</span>&#160;    }</div>
<div class="line"><a name="l00344"></a><span class="lineno">  344</span>&#160;}<div class="ttc" id="class_protocol_data_unit_html"><div class="ttname"><a href="class_protocol_data_unit.html">ProtocolDataUnit</a></div><div class="ttdoc">Protocol Data Unit class. </div><div class="ttdef"><b>Definition:</b> <a href="_protocol_data_unit_8h_source.html#l00033">ProtocolDataUnit.h:33</a></div></div>
<div class="ttc" id="class_traffic_generator_html_aa1943a93355f1856e639a0f163413249"><div class="ttname"><a href="class_traffic_generator.html#aa1943a93355f1856e639a0f163413249">TrafficGenerator::createInstanceTrafficEvent</a></div><div class="ttdeci">virtual std::shared_ptr&lt; Token &gt; createInstanceTrafficEvent(bool recordRoute=false)=0</div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8cpp_source.html#l00075">TrafficGenerator.cpp:75</a></div></div>
<div class="ttc" id="class_traffic_generator_html_aaa73cfc4e885ecfeecbe894efd232493"><div class="ttname"><a href="class_traffic_generator.html#aaa73cfc4e885ecfeecbe894efd232493">TrafficGenerator::isOn</a></div><div class="ttdeci">bool isOn</div><div class="ttdoc">True if generator is on (and generating traffic); false if generator is off. </div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8h_source.html#l00051">TrafficGenerator.h:51</a></div></div>
<div class="ttc" id="class_traffic_generator_html_acb5d8009cf49ff99a6fee75ec456e166"><div class="ttname"><a href="class_traffic_generator.html#acb5d8009cf49ff99a6fee75ec456e166">TrafficGenerator::tokenContents</a></div><div class="ttdeci">std::shared_ptr&lt; Entity &gt; tokenContents</div><div class="ttdoc">Reference to Entity object that will be carried by the token. </div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8h_source.html#l00047">TrafficGenerator.h:47</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="abb89d1eefa73ddf5ea95167bd9245b48"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::shared_ptr&lt; <a class="el" href="class_entity.html">Entity</a> &gt; TrafficGenerator::getDestination </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Get destination for tokens generated from this generator..</p>
<dl class="section return"><dt>Returns</dt><dd>Destination facility. </dd></dl>

<p>Definition at line <a class="el" href="_traffic_generator_8cpp_source.html#l00249">249</a> of file <a class="el" href="_traffic_generator_8cpp_source.html">TrafficGenerator.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00249"></a><span class="lineno">  249</span>&#160;                                                             {</div>
<div class="line"><a name="l00250"></a><span class="lineno">  250</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="class_traffic_generator.html#a6ba09ea9c5df93de64af75886df0b11b">destination</a>;</div>
<div class="line"><a name="l00251"></a><span class="lineno">  251</span>&#160;}</div>
<div class="ttc" id="class_traffic_generator_html_a6ba09ea9c5df93de64af75886df0b11b"><div class="ttname"><a href="class_traffic_generator.html#a6ba09ea9c5df93de64af75886df0b11b">TrafficGenerator::destination</a></div><div class="ttdeci">std::shared_ptr&lt; Entity &gt; destination</div><div class="ttdoc">Destination entity, to which the generated tokens will be sent. </div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8h_source.html#l00049">TrafficGenerator.h:49</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="ac97d2e786e7c91117fbf590988eefd04"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="_event_type_8h.html#a2628ea8d12e8b2563c32f05dc7fff6fa">EventType</a> TrafficGenerator::getEventType </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Get EventType this generator includes in Tokens.</p>
<dl class="section return"><dt>Returns</dt><dd>EventType. </dd></dl>

<p>Definition at line <a class="el" href="_traffic_generator_8cpp_source.html#l00213">213</a> of file <a class="el" href="_traffic_generator_8cpp_source.html">TrafficGenerator.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00213"></a><span class="lineno">  213</span>&#160;                                               {</div>
<div class="line"><a name="l00214"></a><span class="lineno">  214</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="class_traffic_generator.html#a84eef27cdbfa66bbf8c14e0128196a62">eventType</a>;</div>
<div class="line"><a name="l00215"></a><span class="lineno">  215</span>&#160;}</div>
<div class="ttc" id="class_traffic_generator_html_a84eef27cdbfa66bbf8c14e0128196a62"><div class="ttname"><a href="class_traffic_generator.html#a84eef27cdbfa66bbf8c14e0128196a62">TrafficGenerator::eventType</a></div><div class="ttdeci">EventType eventType</div><div class="ttdoc">Event type that this generator will produce. </div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8h_source.html#l00046">TrafficGenerator.h:46</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a2247f62c33cf0875f423b58403af7042"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::shared_ptr&lt; <a class="el" href="class_entity.html">Entity</a> &gt; TrafficGenerator::getSource </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Get source <a class="el" href="class_entity.html" title="Entity class. ">Entity</a> this generator includes in Tokens.</p>
<dl class="section return"><dt>Returns</dt><dd>Source <a class="el" href="class_entity.html" title="Entity class. ">Entity</a>. </dd></dl>

<p>Definition at line <a class="el" href="_traffic_generator_8cpp_source.html#l00231">231</a> of file <a class="el" href="_traffic_generator_8cpp_source.html">TrafficGenerator.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00231"></a><span class="lineno">  231</span>&#160;                                                        {</div>
<div class="line"><a name="l00232"></a><span class="lineno">  232</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="class_traffic_generator.html#a4f69b85034831c2c40e789b0c0e11511">source</a>;</div>
<div class="line"><a name="l00233"></a><span class="lineno">  233</span>&#160;}</div>
<div class="ttc" id="class_traffic_generator_html_a4f69b85034831c2c40e789b0c0e11511"><div class="ttname"><a href="class_traffic_generator.html#a4f69b85034831c2c40e789b0c0e11511">TrafficGenerator::source</a></div><div class="ttdeci">std::shared_ptr&lt; Entity &gt; source</div><div class="ttdoc">Entity to which the generator is attached (to which tokens are generated). </div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8h_source.html#l00048">TrafficGenerator.h:48</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a3f71664ca8b268773234c1538539bebf"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::shared_ptr&lt; <a class="el" href="class_entity.html">Entity</a> &gt; TrafficGenerator::getTokenContents </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Get token contents.</p>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="class_token.html" title="Token class. ">Token</a> contents included in tokens generated by this class. </dd></dl>

<p>Definition at line <a class="el" href="_traffic_generator_8cpp_source.html#l00204">204</a> of file <a class="el" href="_traffic_generator_8cpp_source.html">TrafficGenerator.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00204"></a><span class="lineno">  204</span>&#160;                                                               {</div>
<div class="line"><a name="l00205"></a><span class="lineno">  205</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="class_traffic_generator.html#acb5d8009cf49ff99a6fee75ec456e166">tokenContents</a>;</div>
<div class="line"><a name="l00206"></a><span class="lineno">  206</span>&#160;}</div>
<div class="ttc" id="class_traffic_generator_html_acb5d8009cf49ff99a6fee75ec456e166"><div class="ttname"><a href="class_traffic_generator.html#acb5d8009cf49ff99a6fee75ec456e166">TrafficGenerator::tokenContents</a></div><div class="ttdeci">std::shared_ptr&lt; Entity &gt; tokenContents</div><div class="ttdoc">Reference to Entity object that will be carried by the token. </div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8h_source.html#l00047">TrafficGenerator.h:47</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="ab9b21f5739748fadede79c7e4fa35ed7"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">unsigned int TrafficGenerator::getTokensGeneratedCount </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Get value of counter for tokens (or traffic events) generated.</p>
<dl class="section return"><dt>Returns</dt><dd>Number of tokens generated so far by this traffic generator. </dd></dl>

<p>Definition at line <a class="el" href="_traffic_generator_8cpp_source.html#l00258">258</a> of file <a class="el" href="_traffic_generator_8cpp_source.html">TrafficGenerator.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00258"></a><span class="lineno">  258</span>&#160;                                                             {</div>
<div class="line"><a name="l00259"></a><span class="lineno">  259</span>&#160;    <span class="keywordflow">return</span> this-&gt;<a class="code" href="class_traffic_generator.html#a29c9cdcb113742700e3f7fcbcb7ee325">tokensGeneratedCount</a>;</div>
<div class="line"><a name="l00260"></a><span class="lineno">  260</span>&#160;}</div>
<div class="ttc" id="class_traffic_generator_html_a29c9cdcb113742700e3f7fcbcb7ee325"><div class="ttname"><a href="class_traffic_generator.html#a29c9cdcb113742700e3f7fcbcb7ee325">TrafficGenerator::tokensGeneratedCount</a></div><div class="ttdeci">unsigned int tokensGeneratedCount</div><div class="ttdoc">Count of tokens (events) generated by this traffic generator. </div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8h_source.html#l00052">TrafficGenerator.h:52</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a9984034478b838d1f09d275e297f3309"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void TrafficGenerator::setDestination </td>
          <td>(</td>
          <td class="paramtype">std::shared_ptr&lt; <a class="el" href="class_entity.html">Entity</a> &gt;&#160;</td>
          <td class="paramname"><em>destination</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Set destination for tokens generated from this generator..</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">destination</td><td>Destination facility. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_traffic_generator_8cpp_source.html#l00267">267</a> of file <a class="el" href="_traffic_generator_8cpp_source.html">TrafficGenerator.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00267"></a><span class="lineno">  267</span>&#160;                                                                       {</div>
<div class="line"><a name="l00268"></a><span class="lineno">  268</span>&#160;    this-&gt;<a class="code" href="class_traffic_generator.html#a6ba09ea9c5df93de64af75886df0b11b">destination</a> = <a class="code" href="class_traffic_generator.html#a6ba09ea9c5df93de64af75886df0b11b">destination</a>;</div>
<div class="line"><a name="l00269"></a><span class="lineno">  269</span>&#160;}</div>
<div class="ttc" id="class_traffic_generator_html_a6ba09ea9c5df93de64af75886df0b11b"><div class="ttname"><a href="class_traffic_generator.html#a6ba09ea9c5df93de64af75886df0b11b">TrafficGenerator::destination</a></div><div class="ttdeci">std::shared_ptr&lt; Entity &gt; destination</div><div class="ttdoc">Destination entity, to which the generated tokens will be sent. </div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8h_source.html#l00049">TrafficGenerator.h:49</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="aa9c53b70da6a733cb0723282b291b25f"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void TrafficGenerator::setEventType </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="_event_type_8h.html#a2628ea8d12e8b2563c32f05dc7fff6fa">EventType</a>&#160;</td>
          <td class="paramname"><em>eventType</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Set EventType this generator includes in Tokens.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">eventType</td><td>EventType to include in tokens generated by this generator. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_traffic_generator_8cpp_source.html#l00222">222</a> of file <a class="el" href="_traffic_generator_8cpp_source.html">TrafficGenerator.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00222"></a><span class="lineno">  222</span>&#160;                                                       {</div>
<div class="line"><a name="l00223"></a><span class="lineno">  223</span>&#160;    this-&gt;<a class="code" href="class_traffic_generator.html#a84eef27cdbfa66bbf8c14e0128196a62">eventType</a> = <a class="code" href="class_traffic_generator.html#a84eef27cdbfa66bbf8c14e0128196a62">eventType</a>;</div>
<div class="line"><a name="l00224"></a><span class="lineno">  224</span>&#160;}</div>
<div class="ttc" id="class_traffic_generator_html_a84eef27cdbfa66bbf8c14e0128196a62"><div class="ttname"><a href="class_traffic_generator.html#a84eef27cdbfa66bbf8c14e0128196a62">TrafficGenerator::eventType</a></div><div class="ttdeci">EventType eventType</div><div class="ttdoc">Event type that this generator will produce. </div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8h_source.html#l00046">TrafficGenerator.h:46</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="ad5c0ccdbf176c8aadd4b1bc7771ea326"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void TrafficGenerator::setSource </td>
          <td>(</td>
          <td class="paramtype">std::shared_ptr&lt; <a class="el" href="class_entity.html">Entity</a> &gt;&#160;</td>
          <td class="paramname"><em>source</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Set source <a class="el" href="class_entity.html" title="Entity class. ">Entity</a> this generator includes in Tokens.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">source</td><td>Source <a class="el" href="class_entity.html" title="Entity class. ">Entity</a> to include in tokens generated by this class. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_traffic_generator_8cpp_source.html#l00240">240</a> of file <a class="el" href="_traffic_generator_8cpp_source.html">TrafficGenerator.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00240"></a><span class="lineno">  240</span>&#160;                                                             {</div>
<div class="line"><a name="l00241"></a><span class="lineno">  241</span>&#160;    this-&gt;<a class="code" href="class_traffic_generator.html#a4f69b85034831c2c40e789b0c0e11511">source</a> = <a class="code" href="class_traffic_generator.html#a4f69b85034831c2c40e789b0c0e11511">source</a>;</div>
<div class="line"><a name="l00242"></a><span class="lineno">  242</span>&#160;}</div>
<div class="ttc" id="class_traffic_generator_html_a4f69b85034831c2c40e789b0c0e11511"><div class="ttname"><a href="class_traffic_generator.html#a4f69b85034831c2c40e789b0c0e11511">TrafficGenerator::source</a></div><div class="ttdeci">std::shared_ptr&lt; Entity &gt; source</div><div class="ttdoc">Entity to which the generator is attached (to which tokens are generated). </div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8h_source.html#l00048">TrafficGenerator.h:48</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="ac8c16ee901079f8279fafd7411098cbd"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void TrafficGenerator::setTokenContents </td>
          <td>(</td>
          <td class="paramtype">std::shared_ptr&lt; <a class="el" href="class_entity.html">Entity</a> &gt;&#160;</td>
          <td class="paramname"><em>tokenContents</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Set token contents.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">tokenContents</td><td>Reference to <a class="el" href="class_entity.html" title="Entity class. ">Entity</a> object that will be carried by the token. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_traffic_generator_8cpp_source.html#l00195">195</a> of file <a class="el" href="_traffic_generator_8cpp_source.html">TrafficGenerator.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160;                                                                           {</div>
<div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;    this-&gt;<a class="code" href="class_traffic_generator.html#acb5d8009cf49ff99a6fee75ec456e166">tokenContents</a> = <a class="code" href="class_traffic_generator.html#acb5d8009cf49ff99a6fee75ec456e166">tokenContents</a>;</div>
<div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160;}</div>
<div class="ttc" id="class_traffic_generator_html_acb5d8009cf49ff99a6fee75ec456e166"><div class="ttname"><a href="class_traffic_generator.html#acb5d8009cf49ff99a6fee75ec456e166">TrafficGenerator::tokenContents</a></div><div class="ttdeci">std::shared_ptr&lt; Entity &gt; tokenContents</div><div class="ttdoc">Reference to Entity object that will be carried by the token. </div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8h_source.html#l00047">TrafficGenerator.h:47</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="af1aeb5d90d269a1d1ac5316522b5233e"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void TrafficGenerator::turnOff </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Turns generator Off. </p>

<p>Definition at line <a class="el" href="_traffic_generator_8cpp_source.html#l00186">186</a> of file <a class="el" href="_traffic_generator_8cpp_source.html">TrafficGenerator.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;                               {</div>
<div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;    this-&gt;<a class="code" href="class_traffic_generator.html#aaa73cfc4e885ecfeecbe894efd232493">isOn</a> = <span class="keyword">false</span>;</div>
<div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;}</div>
<div class="ttc" id="class_traffic_generator_html_aaa73cfc4e885ecfeecbe894efd232493"><div class="ttname"><a href="class_traffic_generator.html#aaa73cfc4e885ecfeecbe894efd232493">TrafficGenerator::isOn</a></div><div class="ttdeci">bool isOn</div><div class="ttdoc">True if generator is on (and generating traffic); false if generator is off. </div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8h_source.html#l00051">TrafficGenerator.h:51</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="aad024e020fac17dbee74f0da16707df1"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void TrafficGenerator::turnOn </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Turns generator On. </p>

<p>Definition at line <a class="el" href="_traffic_generator_8cpp_source.html#l00178">178</a> of file <a class="el" href="_traffic_generator_8cpp_source.html">TrafficGenerator.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;                              {</div>
<div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;    this-&gt;<a class="code" href="class_traffic_generator.html#aaa73cfc4e885ecfeecbe894efd232493">isOn</a> = <span class="keyword">true</span>;</div>
<div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;}</div>
<div class="ttc" id="class_traffic_generator_html_aaa73cfc4e885ecfeecbe894efd232493"><div class="ttname"><a href="class_traffic_generator.html#aaa73cfc4e885ecfeecbe894efd232493">TrafficGenerator::isOn</a></div><div class="ttdeci">bool isOn</div><div class="ttdoc">True if generator is on (and generating traffic); false if generator is off. </div><div class="ttdef"><b>Definition:</b> <a href="_traffic_generator_8h_source.html#l00051">TrafficGenerator.h:51</a></div></div>
</div><!-- fragment -->
</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a class="anchor" id="a6ba09ea9c5df93de64af75886df0b11b"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::shared_ptr&lt;<a class="el" href="class_entity.html">Entity</a>&gt; TrafficGenerator::destination</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Destination entity, to which the generated tokens will be sent. </p>

<p>Definition at line <a class="el" href="_traffic_generator_8h_source.html#l00049">49</a> of file <a class="el" href="_traffic_generator_8h_source.html">TrafficGenerator.h</a>.</p>

</div>
</div>
<a class="anchor" id="a84eef27cdbfa66bbf8c14e0128196a62"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="_event_type_8h.html#a2628ea8d12e8b2563c32f05dc7fff6fa">EventType</a> TrafficGenerator::eventType</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p><a class="el" href="class_event.html" title="Event class. ">Event</a> type that this generator will produce. </p>

<p>Definition at line <a class="el" href="_traffic_generator_8h_source.html#l00046">46</a> of file <a class="el" href="_traffic_generator_8h_source.html">TrafficGenerator.h</a>.</p>

</div>
</div>
<a class="anchor" id="aaa73cfc4e885ecfeecbe894efd232493"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool TrafficGenerator::isOn</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>True if generator is on (and generating traffic); false if generator is off. </p>

<p>Definition at line <a class="el" href="_traffic_generator_8h_source.html#l00051">51</a> of file <a class="el" href="_traffic_generator_8h_source.html">TrafficGenerator.h</a>.</p>

</div>
</div>
<a class="anchor" id="a2158c9e714171e5a04032571021b23c4"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int TrafficGenerator::priority</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p><a class="el" href="class_token.html" title="Token class. ">Token</a> priority. Higher priority, higher number. </p>

<p>Definition at line <a class="el" href="_traffic_generator_8h_source.html#l00050">50</a> of file <a class="el" href="_traffic_generator_8h_source.html">TrafficGenerator.h</a>.</p>

</div>
</div>
<a class="anchor" id="a9569cd494b926b84f384c7380349d51a"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_scheduler.html">Scheduler</a>&amp; TrafficGenerator::scheduler</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Reference to <a class="el" href="class_scheduler.html" title="Scheduler class. ">Scheduler</a> object, such that traffic generators may schedule their events. </p>

<p>Definition at line <a class="el" href="_traffic_generator_8h_source.html#l00044">44</a> of file <a class="el" href="_traffic_generator_8h_source.html">TrafficGenerator.h</a>.</p>

</div>
</div>
<a class="anchor" id="a42261ccf207f61a401473a106bc0bae3"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_simulator_globals.html">SimulatorGlobals</a>&amp; TrafficGenerator::simulatorGlobals</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Reference to <a class="el" href="class_simulator_globals.html" title="Simulator-scope variables and parameters. ">SimulatorGlobals</a> object, to get random generator info. </p>

<p>Definition at line <a class="el" href="_traffic_generator_8h_source.html#l00045">45</a> of file <a class="el" href="_traffic_generator_8h_source.html">TrafficGenerator.h</a>.</p>

</div>
</div>
<a class="anchor" id="a4f69b85034831c2c40e789b0c0e11511"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::shared_ptr&lt;<a class="el" href="class_entity.html">Entity</a>&gt; TrafficGenerator::source</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p><a class="el" href="class_entity.html" title="Entity class. ">Entity</a> to which the generator is attached (to which tokens are generated). </p>

<p>Definition at line <a class="el" href="_traffic_generator_8h_source.html#l00048">48</a> of file <a class="el" href="_traffic_generator_8h_source.html">TrafficGenerator.h</a>.</p>

</div>
</div>
<a class="anchor" id="acb5d8009cf49ff99a6fee75ec456e166"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::shared_ptr&lt;<a class="el" href="class_entity.html">Entity</a>&gt; TrafficGenerator::tokenContents</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Reference to <a class="el" href="class_entity.html" title="Entity class. ">Entity</a> object that will be carried by the token. </p>

<p>Definition at line <a class="el" href="_traffic_generator_8h_source.html#l00047">47</a> of file <a class="el" href="_traffic_generator_8h_source.html">TrafficGenerator.h</a>.</p>

</div>
</div>
<a class="anchor" id="a29c9cdcb113742700e3f7fcbcb7ee325"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">unsigned int TrafficGenerator::tokensGeneratedCount</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Count of tokens (events) generated by this traffic generator. </p>

<p>Definition at line <a class="el" href="_traffic_generator_8h_source.html#l00052">52</a> of file <a class="el" href="_traffic_generator_8h_source.html">TrafficGenerator.h</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>QcnSim/<a class="el" href="_traffic_generator_8h_source.html">TrafficGenerator.h</a></li>
<li>QcnSim/<a class="el" href="_traffic_generator_8cpp_source.html">TrafficGenerator.cpp</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Mon Jan 6 2014 12:30:45 for QCNSim by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.5
</small></address>
</body>
</html>
